Re: ORDER BY and Unicode - Mailing list pgsql-novice

From Tom Lane
Subject Re: ORDER BY and Unicode
Date
Msg-id 26050.1084379926@sss.pgh.pa.us
Whole thread Raw
In response to Re: ORDER BY and Unicode  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-novice
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> IIRC, right now upper and lower only work correctly in
> single byte encodings. I think when full sql collation
> and character set behavior is done this problem will
> go away.

That unfortunately isn't looking like something that will happen soon.
What might be more practical to do in the short run is to make use of
libc's <wctype.h> routines to do upper/lower case conversion, rather
than <ctype.h>.  On machines that have mbstowcs() and wcstombs() I think
this might be fairly straightforward, but I don't have the time or
background to code it up and test it.  Any volunteers out there?

Note that this would amount to assuming that LC_CTYPE matches the
database encoding, but the truth of the matter is that the existing
code fails if that's not true anyway.

            regards, tom lane

pgsql-novice by date:

Previous
From: joseph speigle
Date:
Subject: Re: ayuda
Next
From: Tom Lane
Date:
Subject: Re: pg_dump problem