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

From: Weiping <laser(at)qmail(dot)zhengmai(dot)net(dot)cn>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: About upper() and lower to handle multibyte char
Date: 2004-10-20 03:37:32
Message-ID: 4175DD7C.7060405@qmail.zhengmai.net.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stuart Bishop 2004-10-20 05:37:46 Re: plpython question
Previous Message pw 2004-10-20 01:52:10 Re: How do I recover from>> pg_xlog/0000000000000000 (log