Skip site navigation (1) Skip section navigation (2)

Re: [ODBC] Unicode support

From: Jean-Michel POURE <jm(dot)poure(at)freesurf(dot)fr>
To: pgadmin-hackers(at)postgresql(dot)org, pgsql-odbc(at)postgresql(dot)org
Cc: Nhan NGO DINH <n(dot)ngodinh(at)tin(dot)it>
Subject: Re: [ODBC] Unicode support
Date: 2002-02-18 11:14:56
Message-ID: 200202181114.g1IBEuFP006239@www1.translationforge (view raw or flat)
Thread:
Lists: pgadmin-hackerspgsql-odbc
Le Lundi 18 Février 2002 11:13, Nhan NGO DINH a écrit :
> Well, you said to export data from the SQL server splitted into structure
> and data. How to do that? I really don't have so much experience with
> Microsoft SQL Server...
>
> Then: I've tried to convert with iconv an UNICODE exported table but I
> don't see the expected results.

What is the encoding of your $MS SQL database? If Unicode, no recoding is 
needed.

I recommand you installed pgAdmin2 (http://pgadmi.postgresql.org) and 
followed the following steps:

1) Create a Unicode database.

2) Use the migration wizard to import $MS SQL Schema into PostgreSQL. It will 
handle type conversion from $MS SQL Server <-> PostgreSQL.

Alternatively, you may use $MS SQL Server GUI to export schema. You will need 
to adapt schema types and objects (convert money into float8, sequences, 
etc...). This can be quite difficult in a large schema.

Use pgAdmin2 graphical interface to make sure all objects are imported : 
keys, sequences, etc.. The best way is to run both GUIs at the same time to 
create the missing objects manually.

3) Export the data from SQL Server into a text file using $MS SQL Server GUI. 
Alternatively, you can attach files in Access2K and export them into a text 
file.

Recode the text file using : recode Latin1..u8 file_name.txt (assuming 
Latin1 is the source encoding). If the $MS SQL database is already Unicode, 
no recoding is required and you can use pgAdmin2 during the entire process.

4) Import the resulting data into PostgreSQL using pgAdmin2 or pgsql \Copy 
statement.

Do not hesitate to write me on pgadmin-hackers(at)postgresql(dot)org for more 
support.

Cheers,
Jean-MIchel POURE

Responses

pgsql-odbc by date

Next:From: Jean-Michel POUREDate: 2002-02-19 07:28:17
Subject: Re: Unicode support
Previous:From: Markus WagnerDate: 2002-02-18 06:59:35
Subject: serious trouble with bool and Access

pgadmin-hackers by date

Next:From: Dannyl@barak.net.ilDate: 2002-02-18 13:45:15
Subject: Hebrew support
Previous:From: Heni LolovDate: 2002-02-18 10:39:23
Subject: Re: CREATE TABLE privilege - will it be implemented?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group