Re: [pgsql-hackers-win32] UNICODE/UTF-8 on win32

Lists: pgsql-hackerspgsql-hackers-win32
From: "John Hansen" <john(at)geeknet(dot)com(dot)au>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Magnus Hagander" <mha(at)sollentuna(dot)net>, "Tatsuo Ishii" <t-ishii(at)sra(dot)co(dot)jp>, <pgsql-hackers-win32(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [pgsql-hackers-win32] UNICODE/UTF-8 on win32
Date: 2005-02-25 08:31:33
Message-ID: 5066E5A966339E42AA04BA10BA706AE5625C@rodrick.geeknet.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

> John Hansen wrote:
> > currently, upper/lower does not work with 2+ byte unicode
> characters,
> > on any OS under the C locale.
>
> Sure it does. It's just that the defined behavior of the C
> locale is often useless in practice.

select upper('æøå');
ERROR: invalid multibyte character for locale
HINT: The server's LC_CTYPE locale is probably incompatible with the database encoding.

Consequently it seems that is does not work.

... John


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "John Hansen" <john(at)geeknet(dot)com(dot)au>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Magnus Hagander" <mha(at)sollentuna(dot)net>, "Tatsuo Ishii" <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers-win32(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [pgsql-hackers-win32] UNICODE/UTF-8 on win32
Date: 2005-02-25 15:18:35
Message-ID: 5100.1109344715@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32

"John Hansen" <john(at)geeknet(dot)com(dot)au> writes:
>> Sure it does. It's just that the defined behavior of the C
>> locale is often useless in practice.

> select upper('');
> ERROR: invalid multibyte character for locale
> HINT: The server's LC_CTYPE locale is probably incompatible with the database encoding.

> Consequently it seems that is does not work.

"It fails on my machine" should not be read as "it doesn't work for anyone".
It all depends on how your local mbstowcs() works.

regards, tom lane