From: | Antti Haapala <antti(dot)haapala(at)iki(dot)fi> |
---|---|
To: | Joseph Shraibman <jks(at)selectacast(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How do I change the server encoding? |
Date: | 2003-02-26 08:56:21 |
Message-ID: | Pine.GSO.4.44.0302261048340.2358-100000@paju.oulu.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Tue, 25 Feb 2003, Joseph Shraibman wrote:
> Peter Eisentraut wrote:
> > Philippe Kiener writes:
> >>
> >>My database should be transform from SQL_ASCII to utf-8
> >>
> >>I have added that line to my dumps:
> >>
> >>SET CLIENT_ENCODING TO 'SQL_ASCII';
> >>
> >>Now when I load the dump into my db, I get that error on tables with text:
> >>
> >>psql:tcom-database.sql:7111: ERROR: copy: line 1, Invalid UNICODE character
> >>sequence found (0xe96500)
> >
> >
> > The client encoding SQL_ASCII means that the data will be passed through
> > unchanged. Try setting it to LATIN1.
> >
> I tried with latin1 and it didn't work.
Hmm... still caused errors? I think that because newer dumps have those
\connects, you need to add explicit char set settings after all of those.
The better way would be converting the whole dump with iconv, though.
Iconv comes by default with many unixen. For example command
iconv -f iso-8859-1 -t utf-8 < text_dump > text_dump_converted
will convert your dump from latin1 to utf-8.
--
Antti Haapala
From | Date | Subject | |
---|---|---|---|
Next Message | Erwin Moller | 2003-02-26 09:02:12 | Newbie needs help: How to create a 'plain' 7.3 database in 7.2.1? |
Previous Message | Ed L. | 2003-02-26 07:53:42 | Re: 7.4? |
From | Date | Subject | |
---|---|---|---|
Next Message | Darko Prenosil | 2003-02-26 09:44:14 | Re: I cant find it or I'm just lazy ? |
Previous Message | Christopher Kings-Lynne | 2003-02-26 07:53:52 | Re: CHECK constraints in pg_dump |