patch for ECPG (BUG #2956: ECPG does not treat multibyte characters correctly.)

From: 原田登志 <harada(dot)toshi(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-patches(at)postgresql(dot)org
Subject: patch for ECPG (BUG #2956: ECPG does not treat multibyte characters correctly.)
Date: 2007-02-09 08:29:21
Message-ID: 20070209082928.342872616C8@serv1.oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hello

I found bug in ecpg concerning processing of the multi-byte character-code.
I reported as bug#2956 before.

The problem is that ecpg is NOT aware of multibyte character

If the multibyte character-code includes 0xc5('\' in ASCII),
ecpg escapes 0xc5 by mistake.
I found this problem when the client-encoding is set to SJIS,
that is one of the Japanese character set.
In SJIS, some characters have 0xc5 as the second byte.

Attached is the patch to fix this problem.

Patch replaces the original character string escape routine
of ecpg with that of libpq.

Regards,

Attachment Content-Type Size
ecpg_patch.zip application/octet-stream 2.2 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2007-02-09 08:37:55 Re: [PATCHES] How can I use 2GB of shared buffers on Windows?
Previous Message Gurjeet Singh 2007-02-09 07:07:12 Re: \prompt for psql