Re: UTF-8

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: UTF-8
Дата
Msg-id 20061013165827.GN1896@svana.org
обсуждение исходный текст
Ответ на Re: UTF-8  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: UTF-8  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Fri, Oct 13, 2006 at 12:04:02PM -0400, Tom Lane wrote:
> "Tomi NA" <hefest@gmail.com> writes:
> > 2006/10/13, Martijn van Oosterhout <kleptog@svana.org>:
> >> 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@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: brian
Дата:
Сообщение: Re: some log statements ignored
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: more anti-postgresql FUD