Re: UNICODE-encoded database does not accept umlaut-characters.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erwin Brandstetter <Brsaz(at)gmzx(dot)at>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: UNICODE-encoded database does not accept umlaut-characters.
Date: 2004-01-19 04:51:20
Message-ID: 20519.1074487880@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Erwin Brandstetter <Brsaz(at)gmzx(dot)at> writes:
> Created a new 7.4 database.
> # create database foo with encoding = UNICODE;
> Then tried to restore my dump from pg 7.2 which was SQL-ASCII or Latin1
> encoded (cant tell which of the two, only got the dump of the old database
> left after upgrading postgresql.)
> Succeeded creating the objects, but no data was restored, instead
> postgresql complained about illegal UNICODE characters.

Yeah; by default PG will assume that you are sending it UNICODE data
if that's what the database encoding is.

You can arrange for conversion to occur by adding
set client_encoding = latin1;
at the top of the dump file.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-01-19 05:00:27 Re: Data recovery!
Previous Message Tom Lane 2004-01-19 04:48:01 Re: massaging data from multiple timezones