Bug #898: client_encoding can't support GB18030 encoding in postgresql 7.3.1 - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject Bug #898: client_encoding can't support GB18030 encoding in postgresql 7.3.1
Date
Msg-id 20030219092705.4F35847580B@postgresql.org
Whole thread Raw
Responses Re: Bug #898: client_encoding can't support GB18030
List pgsql-bugs
zzhb (dragzhb@yahoo.com.cn) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
client_encoding can't support GB18030 encoding in postgresql 7.3.1

Long Description
When I insert records using files, psql -f install.sql

if I set PGCLIENTENCODING=GB18030, psql insert simplifed chinese incorrectly,but if I set PGCLIENTENCODING=GBK or unset
PGCLIENTENCODING,psqlinsert simplifed chinese correctly. 

But when I use \encoding GB18030 to insert records in interactive psql,it can insert simplifed chinese correctly.

The following is my envirnoment.

[postgres@hbzhang postgres]$ psql -l
        List of databases
   Name    |  Owner   | Encoding
-----------+----------+----------
 template0 | postgres | UNICODE
 template1 | postgres | UNICODE
 test      | postgres | UNICODE
(3 rows)

[postgres@hbzhang postgres]$
[postgres@hbzhang postgres]$ locale
LANG=zh_CN.GB18030
LC_CTYPE="zh_CN.GB18030"
LC_NUMERIC="zh_CN.GB18030"
LC_TIME="zh_CN.GB18030"
LC_COLLATE="zh_CN.GB18030"
LC_MONETARY="zh_CN.GB18030"
LC_MESSAGES="zh_CN.GB18030"
LC_PAPER="zh_CN.GB18030"
LC_NAME="zh_CN.GB18030"
LC_ADDRESS="zh_CN.GB18030"
LC_TELEPHONE="zh_CN.GB18030"
LC_MEASUREMENT="zh_CN.GB18030"
LC_IDENTIFICATION="zh_CN.GB18030"
LC_ALL=
[postgres@hbzhang postgres]$



[root@hbzhang root]# uname -a
Linux hbzhang 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
[root@hbzhang root]#

[root@hbzhang root]# pg_ctl --version
pg_ctl (PostgreSQL) 7.3.1
[root@hbzhang root]#

Sample Code


No file was uploaded with this report

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Windows binaries for 7.3.2?
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #899: pg_dumpall produce erroneous files if the databbase use procedural language.