patch for ECPG (BUG #2956: ECPG does not treat multibyte characters correctly.) - Mailing list pgsql-patches

From 原田登志
Subject patch for ECPG (BUG #2956: ECPG does not treat multibyte characters correctly.)
Date
Msg-id 20070209082928.342872616C8@serv1.oss.ntt.co.jp
Whole thread Raw
Responses Re: patch for ECPG (BUG #2956: ECPG does not treat multibyte characters correctly.)  (Michael Meskes <meskes@postgresql.org>)
List 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

pgsql-patches by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: [HACKERS] plpgsql, return can contains any expression
Next
From: Jeremy Drake
Date:
Subject: Re: patch adding new regexp functions