Big5 contains '\'

From: Limin Liu <limin(at)pumpkinnet(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org, limin(at)pumpkinnet(dot)com
Subject: Big5 contains '\'
Date: 2001-06-12 18:18:54
Message-ID: 3B265D0E.9A31AA6@pumpkinnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi,

My project requires to use Big5/EUC_TW (two bytes per
chinese-character).

Unfortunately, Big5 code contains escape '\'.
For instance,
1: create table "¦¨¥\ªº¤(at)¥b" (n int, m text);
2: create table n (n int, m text);
3: insert into n values (19,'¦nªº¶}©l¬O¦¨¥\ªº¤(at)¥b'); -- 10 chinese
characters
4: select * from n;
n | m
----+----------------------
15 | ¦nªº¶}©l¬O¦¨¥ªº¤(at)¥b

Table name in line 1 is ¦¨¥\ªº¤(at)¥b(dot) With ", there is no problem. Line
3 tries to insert a value with escape '\'. I realized this '\' is
gone. Of course, what we see are totally nonsense after the 6th
character.

This can be fixed by creating a MULTIBYTE block in scansup.c (see
attachment). Can you put this in the next release if there is no
objection (or bugs). :-)

I am thinking about to write an introduction book for PostgreSQL in
chinese (big5). With this problem, it will be hard to convince them to
use PostgreSQL.

--
Regards,
Limin Liu

Attachment Content-Type Size
scansup.c application/octet-stream 3.0 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-06-12 18:20:43 Re: Format of BOOLEAN
Previous Message Stephan Szabo 2001-06-12 18:16:14 Re: select, where and null-values (or: select null<>'1' is fuzzy)

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-06-12 18:23:11 Re: Patch to include PAM support...
Previous Message Peter Eisentraut 2001-06-12 18:16:14 Re: Patch to include PAM support...