Re: Bug #676: lower(), upper(), & initcap() do not work on
От | Tatsuo Ishii |
---|---|
Тема | Re: Bug #676: lower(), upper(), & initcap() do not work on |
Дата | |
Msg-id | 20020528.100759.52176594.t-ishii@sra.co.jp обсуждение исходный текст |
Ответ на | Re: Bug #676: lower(), upper(), & initcap() do not work on utf-8 chars (Henry House <hajhouse@houseag.com>) |
Список | pgsql-bugs |
> > lower/upper-casing is driven by locale, not encoding. > > > > Unfortunately you didn't mention anything about your locale setup... > > The server locale is en_US.UTF-8. (At least I set it up as such when > installing PostgreSQL; I know no way to verify.) The server version is 7.2.1, > running on a IA32 and a DEC Alpha; both machines show the same behavior. Both > are Debian Linux. Perhaps the bug lies in the locale definition supplied by > Debian? I don't think current locale support code works with mutibyte encodings such as UTF-8. See the thread tiled "Bug #659: lower()/upper() bug on" on pgsql-bugs and pgsql-hackers. In the mean time, a work around would be something like: select convert(lower(convert('X', 'LATIN1')),'LATIN1','UNICODE'); That will convert UTF-8 'X' to its lower case if you are sure that 'X' could be converted to ISO-8859-1. Of course the problem with this method is: Someone has suggested me a fix using UTF-8 locales, but I'm worried about usage of UTF-8 and am waiting for the test result with my Japanese data. -- Tatsuo Ishii
В списке pgsql-bugs по дате отправления: