From: Troy <tjk@tksoft.com>
To: antti.haapala@iki.fi
Cc: tjk@tksoft.com
Cc: postgre@totw.org
Cc: pgsql-sql@postgresql.org
Subject: Re: once again, sorting with Unicode
Date: Thu, 20 Feb 2003 02:51:28 -0800 (PST)
Message-ID: <200302201051.h1KApSSN018184@tksoft.com> (raw)
In-Reply-To: <Pine.GSO.4.44.0302191413590.21258-100000@paju.oulu.fi>
You are right, of course. I was thinking in terms of the encoded
data. Applications usually get data in UTF8 or UTF16. If the
input data is true unicode, then there is no difference in
the byte values (just skip the 0x00 bytes).
Cheers,
Troy
>
>
> On Wed, 19 Feb 2003, Troy wrote:
>
> > > I have a multi-lingual database (currently 11 languages) which sorts
> > > fine in MySQL (8859-1 character set) I have now converted the data to
> > > Unicode and compiled Postgre with unicode support.
> > >
> > > I can select and insert unicode and so was rather pleased about that.
> > > Until I saw that it wasn't working properly when ordering!
> >
> > The cause for the different values is the fact that unicode characters
> > have different numeric values from ISO8859-1 and other encodings. Only
> > ascii values are in sync with unicode numeric values. This I am sure you
> > knew.
>
> No, ISO8859-1 maps directly to unicode up to U+00FF. So the actual
> _numeric_ values are the same. But actual byte patterns are encoding
> dependent.
>
> Have you set database encoding to UTF-8? Are you using proper UTF-8
> locales? POSIX compiled locales are often charset dependent.
>
> --
> Antti Haapala
>
>
>
>
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tjk@tksoft.com, antti.haapala@iki.fi, postgre@totw.org
Subject: Re: once again, sorting with Unicode
In-Reply-To: <200302201051.h1KApSSN018184@tksoft.com>
* 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