pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ivo Rossacher <rossacher@bluewin.ch>
To: pgsql-admin@postgresql.org
Subject: Change the character encoding of a database
Date: Mon, 28 Jun 2004 23:38:24 +0200
Message-ID: <200406282338.25074.rossacher@bluewin.ch> (raw)

Hi All,

I do have a database which was created with the encoding SQL_ASCII and used 
with German, French and Italien strings. Until recently there was only a 
Linux client, an all worked fine (Suse 8.1). Now there is a new Windows 
client which does have a different idea of the encoding. I did some tests and 
found out that the encoding UNICODE does work properly for both clients.
The question now is how to change the encoding of database from SQL_ASCII to 
UNICODE?

I did try to dump the database by pgdump database > dump.dmp, droped the 
database, recreate it with the encoding UNICODE and restore the dump by psql 
database < dump.dmp which worked after some small changes (change the client 
encoding to UNICODE) in the dump.dmp. Without the changes in the dump.dmp 
there was a error message about invalide codes and no import at all. With the 
changes there are still some encoding mistakes (wrong signes in the strings) 
but the import basically works. The server actually runs on the same machine 
as the client (Suse 8.1). I think there is a problem with the import because 
the linux system is not set to use UNICODE. Is there an way to get the data 
converted correctly?
-- 
Ivo Rossacher



view thread (3+ messages)  latest in thread

Message-ID: <200406282338.25074.rossacher@bluewin.ch>
Permalink:  ../200406282338.25074.rossacher@bluewin.ch/
Also on:    postgresql.org/message-id/200406282338.25074.rossacher@bluewin.ch

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: rossacher@bluewin.ch
  Subject: Re: Change the character encoding of a database
  In-Reply-To: <200406282338.25074.rossacher@bluewin.ch>
  References: <200406282338.25074.rossacher@bluewin.ch>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox