Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2 - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2
Date
Msg-id 20020222182310Z.t-ishii@sra.co.jp
Whole thread Raw
In response to Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2  (Jean-Michel POURE <jm.poure@freesurf.fr>)
List pgsql-hackers
> 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

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2
Next
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: point in time recovery and moving datafiles online