From: 江文 <jiangwen365@sohu.com>
To: pgsql-admin@postgresql.org
Subject: Do I have to change my Locale or database Encoding to enable LOWER() ?
Date: Mon, 14 Mar 2005 17:06:51 +0800 (CST)
Message-ID: <13979541.1110791211578.JavaMail.postfix@mx37.mail.sohu.com> (raw)
Hello Hackers,
I store some information of manufacturing materials in a table, and in this table there's a column storing material's name. 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, because I don't want to see my data clearly in PGAdmin 3 instead of *&^%$#@ .
Any suggestions will be appreicated!
Thanks in advance,
Henry
------------------------------------------
弄懂了PostgreSQL, 就知道了什么才是共产主义
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jiangwen365@sohu.com
Subject: Re: Do I have to change my Locale or database Encoding to enable LOWER() ?
In-Reply-To: <13979541.1110791211578.JavaMail.postfix@mx37.mail.sohu.com>
References: <13979541.1110791211578.JavaMail.postfix@mx37.mail.sohu.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox