Re: UTF-8 and LIKE vs =
От | Tom Lane |
---|---|
Тема | Re: UTF-8 and LIKE vs = |
Дата | |
Msg-id | 20743.1093301087@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: UTF-8 and LIKE vs = (David Wheeler <david@kineticode.com>) |
Ответы |
Re: UTF-8 and LIKE vs =
|
Список | pgsql-general |
David Wheeler <david@kineticode.com> writes: > On Aug 23, 2004, at 1:58 PM, Ian Barwick wrote: >> er, the characters in "name" don't seem to match the characters in the >> query - '=B1=B9=B9=E6=BA=F1' vs. '=BA=CF=C7=D1=C0=C7' - does that have an= > y bearing? > Yes, it means that = is doing the wrong thing!! I have seen this happen in situations where the strings contained character sequences that were illegal according to the encoding that the locale thought was in force. (It seems that strcoll() will return more or less random results in such cases...) In particular, given that you have > LC_COLLATE: en_US.UTF-8 > LC_CTYPE: en_US.UTF-8 you are at risk if the data is not legal UTF-8 strings. The real question therefore is whether you have the database encoding set correctly --- ie, is it UNICODE (== UTF8)? If not then it may well be that Postgres is presenting strings to strcoll() that the latter will choke on. regards, tom lane
В списке pgsql-general по дате отправления: