Skip site navigation (1) Skip section navigation (2)

Re: UTF-8 and LIKE vs =

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Wheeler <david(at)kineticode(dot)com>
Cc: Ian Barwick <barwick(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: UTF-8 and LIKE vs =
Date: 2004-08-23 23:35:29
Message-ID: 25465.1093304129@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
David Wheeler <david(at)kineticode(dot)com> writes:
>> Is the problem query using an index?  If so, does REINDEX help?

> Doesn't look like it:

> bric=3D# reindex index udx_keyword__name;
> REINDEX
> bric=3D# select * from keyword where name =3D'=BA=CF=C7=D1=C0=C7';
>    id  |  name  | screen_name | sort_name | active
> ------+--------+-------------+-----------+--------
>   1218 | =B1=B9=B9=E6=BA=F1 | =B1=B9=B9=E6=BA=F1      | =B1=B9=B9=E6=BA=F1=
>     |      1
> (1 row)

Hmm.  I tried putting your string into a UNICODE database and I got
ERROR:  invalid byte sequence for encoding "UNICODE": 0xc7

So there's something funny happening here.  What is your client_encoding
setting?

			regards, tom lane

In response to

Responses

pgsql-general by date

Next:From: David WheelerDate: 2004-08-23 23:49:15
Subject: Re: UTF-8 and LIKE vs =
Previous:From: Ian BarwickDate: 2004-08-23 23:34:46
Subject: Re: UTF-8 and LIKE vs =

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group