Re: BUG #1721: mutiple bytes character string comaprison - Mailing list pgsql-bugs

From Tatsuo Ishii
Subject Re: BUG #1721: mutiple bytes character string comaprison
Date
Msg-id 20050620.143740.74751523.t-ishii@sra.co.jp
Whole thread Raw
In response to BUG #1721: mutiple bytes character string comaprison error  ("Chii-Tung Liu" <cdliou@mail.cyut.edu.tw>)
List pgsql-bugs
> The following bug has been logged online:
>
> Bug reference:      1721
> Logged by:          Chii-Tung Liu
> Email address:      cdliou@mail.cyut.edu.tw
> PostgreSQL version: 8.0.3
> Operating system:   Windows XP SP2
> Description:        mutiple bytes character string comaprison error
> Details:
>
> When compare two UTF-8 encoded string that contains Chinese words, the
> result is always TRUE
> 1. create a database test with encoding set to unicode
> CREATE DATABASE test
>   WITH OWNER = postgres
>        ENCODING = 'UNICODE'
>        TABLESPACE = pg_default;
> 2. insert data with Chinese words
> INSERT into node set title='1 $BCfJ8(B'
>
> 3. SELECT title from node where title > '1.1 '
> would return '1 $BCfJ8(B'
>
> 4. Both SELECT '1 $BCfJ8(B' > '1.1' and  SELECT '1.1' > '1 $BCfJ8(B' return
> FALSE

I think you need to use C locale.
--
Tatsuo Ishii

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1721: mutiple bytes character string comaprison error
Next
From: "Massimo Mollo"
Date:
Subject: BUG #1722: table with a serial field don't works