Re: JDBC to load UTF8@psql to latin1@mysql - Mailing list pgsql-general

From Tom Lane
Subject Re: JDBC to load UTF8@psql to latin1@mysql
Date
Msg-id 29835.1355498159@sss.pgh.pa.us
Whole thread Raw
In response to Re: JDBC to load UTF8@psql to latin1@mysql  (Emi Lu <emilu@encs.concordia.ca>)
Responses Re: JDBC to load UTF8@psql to latin1@mysql
List pgsql-general
Emi Lu <emilu@encs.concordia.ca> writes:
> For now, through the following method, all letters are correctly
> transformed except "�".

Meh.  That character renders as \310 in your mail, which is not an
assigned code in ISO 8859-1.  The numerically corresponding Unicode
value would be U+0090, which is an unspecified control character.

I surmise that your source data is not actually either Unicode or
ISO 8859-1, but one of the random "extended" character sets that
Microsoft has loosed upon the world, perhaps windows-1252
http://en.wikipedia.org/wiki/Windows-1252

The conversion code that you're using is quite right to reject the
character as not being valid LATIN1.  What you need to do is figure out
what the data actually is and correct its encoding.  It's evidently
stored wrong in the UTF8 data, if you believe that this code is a
letter.

            regards, tom lane


pgsql-general by date:

Previous
From: Emi Lu
Date:
Subject: Re: JDBC to load UTF8@psql to latin1@mysql
Next
From: joshua
Date:
Subject: Implicit casts to array types