Re: [HACKERS] UTF8 or Unicode

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: "Markus Bertheau ?" <twanger@bluetwanger.de>, Peter Eisentraut <peter_e@gmx.net>, Tatsuo Ishii <t-ishii@sra.co.jp>, dpage@vale-housing.co.uk, oliver@opencloud.com, zakkr@zf.jcu.cz, PostgreSQL-patches <pgsql-patches@postgresql.org>
Date: 2005-03-02T17:54:20Z
Lists: pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.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.

			regards, tom lane