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

Re: BUG #1721: mutiple bytes character string comaprison

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: cdliou(at)mail(dot)cyut(dot)edu(dot)tw
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1721: mutiple bytes character string comaprison
Date: 2005-06-20 05:37:40
Message-ID: 20050620.143740.74751523.t-ishii@sra.co.jp (view raw or flat)
Thread:
Lists: pgsql-bugs
> The following bug has been logged online:
> 
> Bug reference:      1721
> Logged by:          Chii-Tung Liu
> Email address:      cdliou(at)mail(dot)cyut(dot)edu(dot)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 中文'
> 
> 3. SELECT title from node where title > '1.1 '
> would return '1 中文'
> 
> 4. Both SELECT '1 中文' > '1.1' and  SELECT '1.1' > '1 中文' return
> FALSE

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

In response to

pgsql-bugs by date

Next:From: Richard HuxtonDate: 2005-06-20 12:36:02
Subject: Re: BUG #1722: table with a serial field don't works
Previous:From: Tom LaneDate: 2005-06-20 04:46:25
Subject: Re: BUG #1721: mutiple bytes character string comaprison error

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