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

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

From
"John Hansen"
Date:
> On HPUX 10.20, mbstowcs seems to treat all byte values as
> single-byte characters in C locale, so my sample-of-one says
> that it works everywhere ;-).

Right, so for the sample SQL I sent earlier, the result would be the same as the input?
That's hardly a working upper/lower....

If a character doesn't have case then fine, but one that does, should at least produce a warning if it cannot be
converted.


... John

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

From
Tom Lane
Date:
"John Hansen" <john@geeknet.com.au> writes:
> Right, so for the sample SQL I sent earlier, the result would be the same as the input?
> That's hardly a working upper/lower....

[ shrug... ]  It works per the locale definition, which is that only
7-bit-ASCII a-z/A-Z get converted.

The bottom line here is that we rely on the locale setting for this
behavior, and that's not likely to change real soon.  If you dislike
the locale definition then you should be using a different locale.
In particular I think the issue here is really that your platform's
definition of "C locale" says that bytes above x7F are illegal
characters.  My platform's doesn't.  The thing to be changing is the
locale definition.

            regards, tom lane