Re: About upper() and lower to handle multibyte char - Mailing list pgsql-general

From Weiping
Subject Re: About upper() and lower to handle multibyte char
Date
Msg-id 4175DD7C.7060405@qmail.zhengmai.net.cn
Whole thread Raw
In response to Re: About upper() and lower to handle multibyte char  (Weiping <laser@qmail.zhengmai.net.cn>)
List pgsql-general
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 UNICODE ...

then everything ok (on my platform: slackware 10 and RH9).

Emm, I think it's better to add some words in our docs to tell the uesr
to do so,
because we always to use --no-locale while initdb, because the default
locale
setting of many Linux destro (normally en_US), would cause the multibyte
character compare operaction fail (like "select '一' = '二'", that's
"select 'one'='two'" in Chinese,
but it return true), and we use UNICODE as database encoding to store
multi-language characters
(like Japanese and Korean), don't know if the locale setting
(zh_CN.utf8) would conflict with
those setting.

Any better suggestion?

Thanks

Laser




pgsql-general by date:

Previous
From: pw
Date:
Subject: Re: How do I recover from>> pg_xlog/0000000000000000 (log
Next
From: Stuart Bishop
Date:
Subject: Re: plpython question