Re: [HACKERS] UTF8 or Unicode

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Markus Bertheau ?" <twanger(at)bluetwanger(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, dpage(at)vale-housing(dot)co(dot)uk, oliver(at)opencloud(dot)com, zakkr(at)zf(dot)jcu(dot)cz, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] UTF8 or Unicode
Date: 2005-03-03 05:20:35
Message-ID: 200503030520.j235KZo01966@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> The correct encoding name is "UTF-8".
>
> > True, but Peter says the ANSI standard calls it UTF8 so that's what I
> > used.
>
> What SQL99 actually says is
>
> - UTF8 specifies the name of a character repertoire that consists
> of every character represented by The Unicode Standard Version
> 2.0 and by ISO/IEC 10646 UTF-8, where each character is encoded
> using the UTF-8 encoding, occupying from 1 (one) through 6
> octets.
>
> That is, "UTF8" is an identifier chosen to refer to an encoding which
> they know perfectly well is really called UTF-8. We should probably
> follow the same convention of using UTF8 in code identifiers and UTF-8
> in documentation. In particular, UTF_8 with an underscore is sanctioned
> by nobody and should be avoided.

OK, new version with utf_8 changed to utf8. The docs mention UTF-8 when
talking about the encoding, but UTF8 when listing the code to use.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 190.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2005-03-03 05:57:20 Re: 8.0.X and the ARC patent
Previous Message Tom Lane 2005-03-03 04:50:04 Re: Vacuum time degrading

Browse pgsql-patches by date

  From Date Subject
Next Message Mark Kirkwood 2005-03-03 05:36:04 Display Pg buffer cache (WIP)
Previous Message Tom Lane 2005-03-03 04:44:00 Re: WIP: buffer manager rewrite (take 2)