Do I have to change my Locale or database Encoding to enable LOWER() ?

Поиск
Список
Период
Сортировка
От 江文
Тема Do I have to change my Locale or database Encoding to enable LOWER() ?
Дата
Msg-id 13979541.1110791211578.JavaMail.postfix@mx37.mail.sohu.com
обсуждение исходный текст
Список pgsql-admin
Hello Hackers,
    I store some information of manufacturing materials in a table, and in this table there's a column storing
material'sname. These names are mixed with Chinese characters and English characters. 
    To convert all English characters in material names into lower cases, I wrote a query:   SELECT
LOWER("ChineseDesc")FROM "Materials"; 

    Then Postgres reported an error:
ERROR:  invalid multibyte character for locale
HINT:  The server's LC_CTYPE locale is probably incompatible with the database encoding.

    After some googling I found out it's caused by the settings of LC_CTYPE & Encoding of the database.

    Here's my db's settings:
    My LC_CTYPE is set to Chinese_People's Republic of China.936 and I'm using UNICODE as this database's encoding.

    But still I'm puzzled:
    Which encoding to choose for my database or do I have to change my Locale setting? I prefer to stay with UNICODE,
becauseI don't want to see my data clearly in PGAdmin 3 instead of *&^%$#@ . 

    Any suggestions will be appreicated!
    Thanks in advance,

    Henry

------------------------------------------
弄懂了PostgreSQL, 就知道了什么才是共产主义

В списке pgsql-admin по дате отправления:

Предыдущее
От: weiping
Дата:
Сообщение: Re: Performance Question
Следующее
От: Weiping
Дата:
Сообщение: Re: Performance Question