Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: jm(dot)poure(at)freesurf(dot)fr
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-odbc(at)postgresql(dot)org, Inoue(at)tpf(dot)co(dot)jp
Subject: Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2
Date: 2002-02-22 09:23:10
Message-ID: 20020222182310Z.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-odbc

> I guess the error might come from PostgreSQL string parsing functions:
> 1) new.target_content:= translate(new.target_content, chr(146), chr (39)) ;
> 2) substring(text, int4). Is substring multibyte safe?

Oh, I think I found the source of the problem. Apparently you did 1)
above in PostgreSQL 7.1.3, right?

7.1's translate is not multibyte aware, so it simply replaces every
occurence of chr(146) = 0x92 to chr(39) = 0x27 even if it's part of
the multibyte sequece.

The broken seqneuce was E3/82/27, which is apparently replaced by
translate() from E3/82/92.
--
Tatsuo Ishii

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2002-02-22 09:55:11 problem with restore of functions
Previous Message Andre Holzner 2002-02-22 09:17:12 Re: Array slice subscripts (was Re: [SQL] plpgsql function

Browse pgsql-odbc by date

  From Date Subject
Next Message Jean-Michel POURE 2002-02-22 11:39:55 Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2
Previous Message Tatsuo Ishii 2002-02-22 09:05:20 Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2