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

Re: Going from a DB using SQL_ASCII to UNICODE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dion Almaer" <dion(at)almaer(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org,"'Lloyd Benson'" <lloyd(at)middleware-company(dot)com>,"Eric Preston" <eric(at)middleware-company(dot)com>
Subject: Re: Going from a DB using SQL_ASCII to UNICODE
Date: 2004-04-20 01:20:44
Message-ID: 2263.1082424044@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
"Dion Almaer" <dion(at)almaer(dot)com> writes:
> When we try to import the data from a SQL_ASCII dumped db, into the new
> UNICODE db, everything freaks out.

I'm no expert on this stuff, but I think what you need to do is add

	set client_encoding = sql_ascii;

to the top of the dump file.  (As of fairly recently, pg_dump will
automatically add such a SET, but I'm pretty sure 7.4.2 won't.)

If that doesn't help, then what you have is actually not valid UTF-8
data, and what you'll have to do is figure out what encoding it's in and
specify that instead.  If it's in a mishmash of different encodings,
you're in for some pain :-(

			regards, tom lane

In response to

Responses

pgsql-admin by date

Next:From: Dion AlmaerDate: 2004-04-20 01:24:25
Subject: Re: Going from a DB using SQL_ASCII to UNICODE
Previous:From: CoLDate: 2004-04-19 22:02:07
Subject: Re: Going from a DB using SQL_ASCII to UNICODE

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