unexpected query behavior with UTF text

From: Indra Heckenbach <indra(at)macnica(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: unexpected query behavior with UTF text
Date: 2003-10-22 10:22:16
Message-ID: 3F965A58.3040602@macnica.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have recently come across an unusual behavior with Postgres 7.3.4 on a
Linux RH 9 system. My database has encoding set to "UNICODE", and the
table includes Japanese text. I'm trying to issue a query like this:

SELECT * FROM sales WHERE name='ja-text';

This query ignores all japanese characters in the comparison text. It
matches properly on ascii chars, but skips right over ja chars.

I tried using "LIKE" instead of "=", and this works fine! I would
expect "=" to do a character by character comparison, but it must not be.

I found a related issue on the mailing list, where locale setting was
causing something similar. However, my locale is set to "en_US.UTF-8",
which is the solution proposed to the other problem.

Is this a bug, or expected behavior? How can I correct this without
resorting to LIKE and escaping wildcard characters?

thanks!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pedro Alves 2003-10-22 10:36:38 Same conditions, different planning?
Previous Message 博 翟 2003-10-22 09:12:45 where is pg_views