Re: convert database to unicode

From: David Lutz <dlutzy(at)yahoo(dot)com(dot)au>
To: Gianni Mariani <gianni(at)mariani(dot)ws>, pgsql-general(at)postgresql(dot)org
Subject: Re: convert database to unicode
Date: 2003-08-26 06:23:32
Message-ID: 20030826062332.23645.qmail@web13907.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

--- Gianni Mariani <gianni(at)mariani(dot)ws> wrote: > David
Lutz wrote:
>
> >Hello, I want to convert an existing database with
> >SQL_ASCII encoding to UNICODE encoding.
> >
> >(postgresql ver 7.3.2)
> >
> >I thought that it might be as easy as:
> >pg_dump mydatabase > dump.sql
> >createdb --encoding=unicode newdatabase
> >psql newdatabase < dump.sql
> >
> You *might* be able to convert dump.sql to unicode.
>
> i.e.
>
> iconv -f iso8859-1 -t utf-8 < dump.sql >
> dump-utf-8.sql
>
> If all the bytea chars are appropriately escaped,
> this may do it.
>
> Can't harm in giving it a go !

Thanks Gianni, yes that appears to have worked.
I didn't know about the iconv command.

Cheers, David

http://search.yahoo.com.au - Yahoo! Search
- Looking for more? Try the new Yahoo! Search

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Björklund 2003-08-26 06:37:08 Re: Index usage
Previous Message Marc G. Fournier 2003-08-26 06:01:26 Re: Replication Ideas