Re: MSSQL to PostgreSQL : Encoding problem - Mailing list pgsql-general

From Bruce Momjian
Subject Re: MSSQL to PostgreSQL : Encoding problem
Date
Msg-id 200611221743.kAMHhJd01809@momjian.us
Whole thread Raw
In response to Re: MSSQL to PostgreSQL : Encoding problem  (Arnaud Lesauvage <thewild@freesurf.fr>)
Responses Re: MSSQL to PostgreSQL : Encoding problem
List pgsql-general
Arnaud Lesauvage wrote:
> > I thought Win1252 was supposed to be almost the same as Latin1.  While
> > I'd expect certain differences, I wouldn't expect it to use 0x00 as
> > data!
> >
> > Maybe you could have DTS export Unicode, which would presumably be
> > UTF-16, then recode that to something else (possibly UTF-8) with GNU
> > iconv.
>
> UTF-16 ! That's something I haven't tried !
> I'll try an iconv conversion tomorrow from UTF16 to UTF8 !

Right!  To clarify, Unicode is the character set, and UTF8 and UTF16 are
ways of representing that characters set in 8-bit and 16-bit segments,
respectively.  PostgreSQL only suports UTF8, and Win32 only supports
UTF16 in the operating system.  And 0x00 is not a valid value in any of
those, that I know of, but perhaps it is in UTF16.

--
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-general by date:

Previous
From: Arnaud Lesauvage
Date:
Subject: Re: MSSQL to PostgreSQL : Encoding problem
Next
From: "Guy Rouillier"
Date:
Subject: Re: Uninstalling PostgreSql