From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Kent Tong <kent(at)cpttm(dot)org(dot)mo> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: equal operator fails on two identical strings if initdb |
Date: | 2004-11-24 15:46:57 |
Message-ID: | 200411241646.57709.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Kent Tong wrote:
> Is there any way to check?
On a POSIX system, you can do
$ LC_ALL=<some_locale> locale charmap
and verify manually that the printed charmap (= character set encoding)
matches what you use in PostgreSQL. I don't know whether an equivalent
interface exists on Windows.
> I have other programs reading and writing Unicode on this
> computer without problems.
Reading and writing Unicode is not a problem. But if you run the string
comparison operators, PostgreSQL passes the Unicode strings from your
database to the operating system's collation routines, which will
compare them thinking they are Big5 (or whatever) strings, which will
result in the random behavior you observed. You need to set an
appropriate locale so that the operating system also thinks they are in
Unicode.
> Are you using the locale routines in mingw?
I believe we do.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-11-24 16:55:27 | Re: BUG #1328: psql don't accept some valid PGCLIENTENCODING values |
Previous Message | PostgreSQL Bugs List | 2004-11-24 11:41:27 | BUG #1328: psql don't accept some valid PGCLIENTENCODING values |