Re: ascii to utf-8

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tom Hart <tomhart(at)coopfed(dot)org>
Cc: Tommy Gildseth <tommy(dot)gildseth(at)usit(dot)uio(dot)no>, Postgres General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: ascii to utf-8
Date: 2008-01-23 23:46:55
Message-ID: 27497.1201132015@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Hart <tomhart(at)coopfed(dot)org> writes:
> Tommy Gildseth wrote:
>> Try editing your dump-file and change the line which reads "SET
>> client_encoding = 'SQL_ASCII';" to "SET client_encoding = 'LATIN1';"
>>
> I tried making the changes you specified with notepad, wordpad, gVim,
> vim and emacs and in each case pgAdmin (and pg_restore) complain about
> the dump header being corrupted.

You can't really manually edit a custom or tar-format archive.
What you'll need to do is use pg_restore to emit a plain SQL script
from the archive, then edit that, then load it via psql (NOT pg_restore).

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-01-23 23:48:20 Re: ascii to utf-8
Previous Message Tom Hart 2008-01-23 23:19:46 [Fwd: Re: retry: converting ASCII to UTF-8]