=?UTF-8?B?SsO2cmcgSGF1c3RlaW4=?= <Joerg.Haustein@urz.uni-heidelberg.de> writes:
> I have a UNICODE database, trying to compare two unicode strings (Ethiopic
> characters). Client encoding is also UNICODE:
> ================================================== =
> testdb=> select '*ድሩ ሁሴን'='ሰ*ፉ ከ*ደ';
> ?column?
> ----------
> t
> (1 row)
> Clearly, it can be seen that they are not equal.
Sounds to me like you chose a locale that is expecting some non-Unicode
encoding. "=" ultimately depends on the system's strcoll() routine,
and in many locales strcoll doesn't behave very sanely when handed data
that's illegal in whatever it thinks the encoding is.
Redo your initdb in a locale that is UTF-8 based, and make sure to keep
the database encoding UTF8. The apparent flexibility to choose
different database encodings really only works if the underlying locale
is "C".
There is a warning about this in the docs, though perhaps not prominent
enough:
http://www.postgresql.org/docs/8.0/s....html#AEN20633
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to
majordomo@postgresql.org so that your
message can get through to the mailing list cleanly