Search Postgresql Archives

Re: UTF-8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 13, 2006 at 12:04:02PM -0400, Tom Lane wrote:
> "Tomi NA" <hefest@xxxxxxxxx> writes:
> > 2006/10/13, Martijn van Oosterhout <kleptog@xxxxxxxxx>:
> >> Similarly, upper/lower are also supported, although postgresql doesn't
> >> take advantage of the system support in that case.
> 
> > I think this is the crux of the problem.
> 
> If it were true, then it might be ...

Eh? Here's the declaration of pg_toupper:

unsigned char pg_toupper(unsigned char ch);

Characters havn't fitted in an unsigned char in a very long time. It's
obviously bogus for any multibyte encoding (the code even says so). For
such encodings you could use the system's towupper() (ANSI C/Unix98)
which will work on any unicode char.

To make this work, pg_strupper() will have to convert each character to
Unicode, run towupper() and convert back to the encoding. I imagine
that'll get rejected for being inefficient, but really don't see any
other way.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux