From: Marc Herbert <Marc.Herbert@continuent.com>
To: pgsql-odbc@postgresql.org
Subject: Re: Unicode is not UTF-8. was :psqlODBC-Driver Test / text
Date: Fri, 31 Mar 2006 21:02:38 +0200
Message-ID: <khjsloyigj5.fsf@meije.emic.fr> (raw)
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4011C98F3@ratbert.vale-housing.co.uk>
<442C3452.5020704@online.de>
<442C4F10.3090004@tpf.co.jp>
<442D5DFB.4080501@online.de>
Johann Zuschlag <zuschlag2@online.de> writes:
> Hmm..., so Windows XP uses UCS-2 or do be more correct (like Bart
> mentioned) UTF-16 (which is nearly the same, except for the
> surrogates).
It's nearly the same... but that makes a huge difference.
The reason why you use fixed-character length encoding in memory is
speed. This saves you a lot of time when computing string lengths,
look for some characters (isalnum(),...), collating etc.
If don't care about all this speed then you better stay in a
variable-length encoding like UTF-8 which saves you A LOT of space,
especially with small occidental alphabets.
I think that by moving from UCS-2 to UTF-16 you lose on BOTH sides
[insert some missing benchmarks here]
And you can be sure that it brings a lot of bugs: one bug every
time some string code has been "forgotten" and not updated, still
assuming UCS-2.
Anyway those bugs are only for far-away and unknown countries out of
the BMP so who cares? :-/
So it really looks like a poor compatibility hack to me (java does it
too).
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: Marc.Herbert@continuent.com
Subject: Re: Unicode is not UTF-8. was :psqlODBC-Driver Test / text
In-Reply-To: <khjsloyigj5.fsf@meije.emic.fr>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4011C98F3@ratbert.vale-housing.co.uk> <442C3452.5020704@online.de> <442C4F10.3090004@tpf.co.jp> <442D5DFB.4080501@online.de> <khjsloyigj5.fsf@meije.emic.fr>
* 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