Re: MSSQL to PostgreSQL : Encoding problem

From: Arnaud Lesauvage <thewild(at)freesurf(dot)fr>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: Richard Huxton <dev(at)archonet(dot)com>, Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: MSSQL to PostgreSQL : Encoding problem
Date: 2006-11-22 14:34:19
Message-ID: 45645FEB.2070406@freesurf.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Magnus Hagander a écrit :
>> > I have done this in Delphi using it's built in UTF8 encoding and
>> > decoding routines. You can get a free copy of Delphi
>> Turbo Explorer
>> > which includes components for MS SQL server and ODBC, so it
>> would be
>> > pretty straight forward to get this working.
>> >
>> > The actual method in Delphi is system.UTF8Encode(widestring). This
>> > will encode unicode to UTF8 which is compatible with a
>> Postgresql UTF8 database.
>>
>> Ah, that's useful to know. Windows just doesn't have the same
>> quantity of tools installed as a *nix platform.
>
> If your file is small enough, you can just open it up in Notepad and
> re-save it as UTF8. It might play funny with the BOMs though
> (byte-order-marks).
>
> There is also, IIRC, an iconv binary available for Windows that should
> be able to do such a conversion. Can't rememebr where thuogh :-)

The file is way too big for notepad. It is even too big for
notepad++.

I do have the GnuWin32 version of iconv (*great* software
collection, BTW), but still no go...
I tried iconv -f "CP1252" -t "UTF-8"
detailrecherche_ansi.csv >detailrecherche_cp1252utf8.csv
and iconv -f "LATIN-9" -t "UTF-8" detailrecherche_ansi.csv
>detailrecherche_latin9utf8.csv

Both don't want to load as UTF8 (invalid byte sequence x00).

I am desperate...
--
Arnaud

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arnaud Lesauvage 2006-11-22 14:34:34 Re: MSSQL to PostgreSQL : Encoding problem
Previous Message Tino Wildenhain 2006-11-22 14:33:41 Re: URL Decoding