From: Bart Samwel <bart@samwel.tk>
To: Marc Herbert <Marc.Herbert@continuent.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Unicode is not UTF-8. was :psqlODBC-Driver Test / text
Date: Mon, 03 Apr 2006 11:03:40 +0200
Message-ID: <4430E4EC.2010208@samwel.tk> (raw)
In-Reply-To: <khjacb3hwcd.fsf@meije.emic.fr>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4011C98F3@ratbert.vale-housing.co.uk>
<442C3452.5020704@online.de>
<442C4F10.3090004@tpf.co.jp>
<442D5DFB.4080501@online.de>
<khjodzmig36.fsf@meije.emic.fr>
<442DD6E2.5070500@samwel.tk>
<khjacb3hwcd.fsf@meije.emic.fr>
Marc Herbert wrote:
> Bart Samwel <bart@samwel.tk> writes:
> wchar_t is not defined as 16-bits, but as "wide enough to hold any
> character of the platform". For instance if the platform uses UCS-4,
> then wchar_t is 32 bits wide.
>
> (UTF-16 wchar_t violates this)
Ahhh, this explains a lot. The same assumption used to be true for char
until they came up with UTF-8 char. And they couldn't just upgrade char
because too much code assumed that char was one byte. Then platforms
started to use UCS-2 wchar_t, then upgraded those to UTF-16 because they
couldn't just upgrade wchar_t because too much code assumed that wchar_t
was two bytes. Same pattern. Time to introduce wwchar_t_t. :-)
> I don't clearly see how you want to use a 8-bit NULL to terminate a
> (wider) wchar_t array... ?
This was a backreference to a situation mentioned earlier in the
discussion, where wchar_t buffers couldn't be "tunneled through" a layer
that used char*, as the wider wchar_t characters may contain NUL bytes.
Cheers,
Bart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: bart@samwel.tk, Marc.Herbert@continuent.com
Subject: Re: Unicode is not UTF-8. was :psqlODBC-Driver Test / text
In-Reply-To: <4430E4EC.2010208@samwel.tk>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4011C98F3@ratbert.vale-housing.co.uk> <442C3452.5020704@online.de> <442C4F10.3090004@tpf.co.jp> <442D5DFB.4080501@online.de> <khjodzmig36.fsf@meije.emic.fr> <442DD6E2.5070500@samwel.tk> <khjacb3hwcd.fsf@meije.emic.fr> <4430E4EC.2010208@samwel.tk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox