Re: the map file between gb18030 and utf8 is error

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: y6108(at)vip(dot)sina(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: the map file between gb18030 and utf8 is error
Date: 2002-11-12 04:39:41
Message-ID: 20021112.133941.08327838.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> hello,
> recently i downloaded postgresql-7.3b5,i found the conversion between
> gb18030 and utf was mistake because the map file bwteen them wasn't
> obviously right.the first byte of utf8 encoding with two bytes shoule
> between 0xc0 with 0xfd,the map file didn't accord with this condition
> .please check it ,i wished that postgresql-7.3 can support the GB18030 and
> can run in China.
> best regards
> jenny wang

Thanks for testing GB18030 support. Yes, the map file is completely
broken. I have attached fixed map generation perl script. Please test
it (I do not understand Chinese).

(1) save the perl script in the postgresql-7.3b5 source tree as:
src/backend/utils/mb/Unicode/UCS_to_GB18030.pl.

(2) run it.

cd src/backend/utils/mb/Unicode
./UCS_to_GB18030.pl

(3) the script will generate
src/backend/utils/mb/Unicode/utf8_to_gb18030.map
and
src/backend/utils/mb/Unicode/gb18030_to_utf8.map

(4) If they look good, rebuild PostgreSQL and test it.
--
Tatsuo Ishii

Attachment Content-Type Size
unknown_filename text/plain 2.3 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2002-11-12 04:40:12 psql tab completion
Previous Message Tom Lane 2002-11-12 04:10:28 Re: Unique functional index and FK constraints