[GENERAL] About upper() and lower to handle multibyte char

2004-10-19 Thread Weiping
Hi, while upgrade to 8.0 (beta3) we got some problem: we have a database which encoding is UNICODE, when we do queries like: select upper(''); --select some multibyte character, then postgresql response: ERROR: invalid multibyte character for locale but when we do it in a SQL_ASCII encoding

Re: [GENERAL] About upper() and lower to handle multibyte char

2004-10-19 Thread Tom Lane
Weiping [EMAIL PROTECTED] writes: we have a database which encoding is UNICODE, when we do queries like: select upper('ÖÐÎÄ'); --select some multibyte character, then postgresql response: ERROR: invalid multibyte character for locale What locale did you initdb in? The most likely

Re: [GENERAL] About upper() and lower to handle multibyte char

2004-10-19 Thread Weiping
Tom Lane wrote: What locale did you initdb in? The most likely explanation for this is that the LC_CTYPE setting is not unicode-compatible. emm, I initdb --no-locale, which means LC_CTYPE=C, but if I don't use it there are some other issue in multibyte comparing (= operator) operation, will

Re: [GENERAL] About upper() and lower to handle multibyte char

2004-10-19 Thread Weiping
Weiping wrote: Tom Lane wrote: What locale did you initdb in? The most likely explanation for this is that the LC_CTYPE setting is not unicode-compatible. finally I get it work, while initdb, we should use matched locale setting and database encoding, like: initdb --locale=zh_CN.utf8 -E