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

Encoding Problem?

From: <cnliou(at)eurosport(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Encoding Problem?
Date: 2002-03-01 07:57:54
Message-ID: 200203010757.36ab@th00.opsion.fr (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi!

pgsql 7.2, Linux 2.0.35.

procedure to reproduce incorrect result:

(1)
either
initdb -E EUC_TW
or
initdb -E MULE_INTERNAL

(2)createdb database1
(3) psql database1
(4) create table test (f1 charchar(255) primary key);
(5) insert into test values('¦¨¥\');
(6) insert into test values('³\');

Explanation:
step (5) and (6) insert 2 different traditional
Chinese strings. The first string contains 2
characters(4 bytes) and the second string contains 1
character (2 bytes).

When the inserts are conducted through postgresqlODBC
7.01.0009, no error message occures but incorrect
strings are saved(and changed) in the backend.

When the inserts are done by psql command prompts, we
can see psql mis-interprets the strings as:

database1=# insert into test values('¦¨¥\');
database1'#

The result is that, the 2-character Chinese string
probably contains the ASCII character ' which
confuses postgresql. The second insert confuses
postgresql the same way (because the character
contains ' ascii code?).

Regards,

CN

--------------------------------------------------------
You too can have your own email address from Eurosport.
http://www.eurosport.com






Responses

pgsql-bugs by date

Next:From: Fouad FezziDate: 2002-03-01 09:21:06
Subject: about catalogue tables bugs?
Previous:From: Reinhard MaxDate: 2002-03-01 07:06:18
Subject: Re: Indexes not always used after inserts/updates/vacuum

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