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

Re: Encoding woes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bendik R(dot)Johansen" <bendik(dot)johansen(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Encoding woes
Date: 2005-04-26 14:40:02
Message-ID: 1858.1114526402@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"Bendik R.Johansen" <bendik(dot)johansen(at)gmail(dot)com> writes:
> I am having a few encoding related problems.

> 1. I have a database set up on my Mac OSX machine, PostgreSQL 8.02. I 
> am trying to dump the tables and load them into Postgres on a Suse 9.2 
> box. I get the following error:
> ERROR:  invalid byte sequence for encoding "UNICODE": 0xe5742c

I'm betting that the database encoding on the source machine was set as
SQL_ASCII, but that you then proceeded to store a lot of data that
wasn't plain ASCII.  To load it into a machine with a different database
encoding, you are going to have to be honest about what the data
actually is.  You should modify the dump file to set "client_encoding"
to the correct description of the source data (Latin1 maybe?).  Postgres
can translate Latin1 to Unicode ... but only if it's told what the data
encoding is.

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Keith WorthingtonDate: 2005-04-26 15:14:58
Subject: Re: audit information
Previous:From: Bendik R.JohansenDate: 2005-04-26 14:15:09
Subject: Encoding woes

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