dbTalk Databases Forums  

[BUGS] BUG #1721: mutiple bytes character string comaprison error

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1721: mutiple bytes character string comaprison error in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chii-Tung Liu
 
Posts: n/a

Default [BUGS] BUG #1721: mutiple bytes character string comaprison error - 06-19-2005 , 08:47 AM







The following bug has been logged online:

Bug reference: 1721
Logged by: Chii-Tung Liu
Email address: cdliou (AT) mail (DOT) 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 ä¸*æ–‡'

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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1721: mutiple bytes character string comaprison error - 06-19-2005 , 10:19 AM






"Chii-Tung Liu" <cdliou (AT) mail (DOT) cyut.edu.tw> writes:
Quote:
PostgreSQL version: 8.0.3
Operating system: Windows XP SP2

When compare two UTF-8 encoded string that contains Chinese words, the
result is always TRUE
Sorry, but UTF-8 encoding doesn't work properly on Windows (yet).
Use some other database encoding.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1721: mutiple bytes character string comaprison error - 06-19-2005 , 11:48 PM



Kris Jurka <books (AT) ejurka (DOT) com> writes:
Quote:
On Sun, 19 Jun 2005, Tom Lane wrote:
Sorry, but UTF-8 encoding doesn't work properly on Windows (yet).
Use some other database encoding.

Shouldn't we forbid its creation then?
There was serious discussion of that before the 8.0 release, but
we decided not to forbid it. Check the archives; I don't recall
the reasoning at the moment.

Quote:
We see these complaints too often.
There are lots of complaints we see way too often ;-) ... but
distressingly, there are still only 24 hours in a day.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
  #4  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #1721: mutiple bytes character string comaprison error - 06-20-2005 , 01:53 PM



Tom Lane wrote:
Quote:
Kris Jurka <books (AT) ejurka (DOT) com> writes:
On Sun, 19 Jun 2005, Tom Lane wrote:
Sorry, but UTF-8 encoding doesn't work properly on Windows (yet).
Use some other database encoding.

Shouldn't we forbid its creation then?

There was serious discussion of that before the 8.0 release, but
we decided not to forbid it. Check the archives; I don't recall
the reasoning at the moment.
UTF8 encoding works with the C locale assuming you don't care about
ordering of the character set, e.g. Japanese.

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
  #5  
Old   
John Hansen
 
Posts: n/a

Default Re: [BUGS] BUG #1721: mutiple bytes character string comaprison error - 06-20-2005 , 02:33 PM



Quote:
=20
UTF8 encoding works with the C locale assuming you don't care=20
about ordering of the character set, e.g. Japanese.
=20
Has anyone with the ability to compile postgresql on windows tested the
ICU patch?

.... John

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
  #6  
Old   
Magnus Hagander
 
Posts: n/a

Default Re: [BUGS] BUG #1721: mutiple bytes character string comaprison error - 06-20-2005 , 03:02 PM



Quote:
UTF8 encoding works with the C locale assuming you don't care about=20
ordering of the character set, e.g. Japanese.
=20
=20
Has anyone with the ability to compile postgresql on windows=20
tested the ICU patch?
Yes.
See http://archives.postgresql.org/pgsql...5/msg00662.php


//Magnus

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.