Re: MSSQL to PostgreSQL : Encoding problem

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Arnaud Lesauvage <thewild(at)freesurf(dot)fr>
Cc: Tomi NA <hefest(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: MSSQL to PostgreSQL : Encoding problem
Date: 2006-11-22 14:14:04
Message-ID: 20061122141404.GA5115@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Arnaud Lesauvage wrote:
> Alvaro Herrera a écrit :
> >Arnaud Lesauvage wrote:
> >>Tomi NA a écrit :
> >>>>I think I'll go this way... No other choice, actually !
> >>>>The MSSQL database is in SQL_Latin1_General_CP1_Cl_AS.
> >>>>I don't really understand what this is. It supports the euro
> >>>>symbol, so it is probably not pure LATIN1, right ?
> >>>
> >>>I suppose you'd have to look at the latin1 codepage character table
> >>>somewhere...I'm a UTF-8 guy so I'm not well suited to respond to the
> >>>question. :)
> >>
> >>Yep, http://en.wikipedia.org/wiki/Latin-1 tells me that
> >>LATIN1 is missing the euro sign...
> >>Grrrrr I hate this !!!
> >
> >So use Latin9 ...
>
> Of course, but it doesn't work !!!
> Whatever client encoding I choose in postgresql before
> COPYing, I get the 'invalid byte sequence error'.

Humm ... how are you choosing the client encoding? Is it actually
working? I don't see how choosing Latin1 or Latin9 and feeding whatever
byte sequence would give you an "invalid byte sequence". These charsets
don't have any way to validate the bytes, as opposed to what UTF-8 can
do. So you could end up with invalid bytes if you choose the wrong
client encoding, but that's a different error.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tony Caduto 2006-11-22 14:32:20 Re: MSSQL to PostgreSQL : Encoding problem
Previous Message Arnaud Lesauvage 2006-11-22 14:08:50 Re: MSSQL to PostgreSQL : Encoding problem