Re: Corruption of multibyte identifiers on UTF-8 locale - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Corruption of multibyte identifiers on UTF-8 locale
Date
Msg-id 25540.1159029401@sss.pgh.pa.us
Whole thread Raw
In response to Corruption of multibyte identifiers on UTF-8 locale  (Victor Snezhko <snezhko@indorsoft.ru>)
Responses Re: Corruption of multibyte identifiers on UTF-8 locale
List pgsql-bugs
Victor Snezhko <snezhko@indorsoft.ru> writes:
> correct utf-8 byte sequence is 0xd18231, so it looks like we call
> tolower() somewhere on parts of multibyte characters, and it does the
> same as isspace() - it interprets it's argument as wide character, and
> converts it.

Indeed, and I am certainly wondering why we should not just say that
you've got a broken locale definition there.  There is absolutely no
doubt that the ctype.h functions are defined to work on char, not wchar.
They have no business mangling high-bit-set bytes in a multibyte
encoding.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Victor Snezhko
Date:
Subject: Re: Corruption of multibyte identifiers on UTF-8 locale
Next
From: Victor Snezhko
Date:
Subject: Re: Corruption of multibyte identifiers on UTF-8 locale