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