change database encoding without corrupting data (latin9 to utf8)

From: filippo <filippo2991(at)virgilio(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: change database encoding without corrupting data (latin9 to utf8)
Date: 2007-05-18 09:46:26
Message-ID: 1179481586.333004.274420@w5g2000hsg.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a problem to entry data to postgres database (latin9) from my
perl/tk application running on windows (utf8). Whenever I try to entry
letter with accents, these looks corrupted once stored into database.

A workaround is to set client encoding to UTF8 after creating the
database connection:

$dbh->do(qq/SET client_encoding to 'UTF8'/);

To avoid such kind of workaround I'd like to convert the whole
database from LATIN9 to UTF8, how can I do it without corrupting the
data?

Thanks,
Filippo

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Macek 2007-05-18 10:56:50 Re: how to return 0 rows in function
Previous Message Marco Colombo 2007-05-18 09:20:29 Re: a few questions on backup