pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ivo Rossacher <rossacher@bluewin.ch>
To: pgsql-admin@postgresql.org
Cc: ogjunk-pgjedan@yahoo.com
Subject: Re: Character encoding problems and dump import
Date: Mon, 20 Mar 2006 23:31:43 +0100
Message-ID: <200603202331.43853.rossacher@bluewin.ch> (raw)
In-Reply-To: <20060320202135.86240.qmail@web50302.mail.yahoo.com>
References: <20060320202135.86240.qmail@web50302.mail.yahoo.com>

Am Montag, 20. März 2006 21.21 schrieb ogjunk-pgjedan@yahoo.com:
> Hello,
>
> I have a dump (non-binary, if it matters) of a DB that has some characters
> in it that my DB doesn't want to take. I'm using PG 8.0.3 and it was
> created with Unicode support:
>
> => \encoding
> UNICODE

This is the client encoding (see \?).
To get server encoding you can do
show server_encoding;  (see command show in the command reference)

Then have a look at the dump to check what the encoding was when the dump was 
taken. (there is a line like set client_encoding = .... somewhere at the 
beginning of the dump)

There where some changes within the unicode handling some time ago. If the 
dump was taken by an other server version there migth be differences. (search 
the archives, there are serveral threads about the issue.

Best regards
Ivo

>
> Characters that cause problems during the import are things like:
> é and other characters from the Extended ASCII table (c.f. bottom of
> http://www.lookuptables.com/ ) Also:
> 'ÇѱÛÀÌ Á¦´ë·Î µÇ´ÂÁö ½ÇÇè... ¿©±â¿¡´Â ¾Æ¹« ¸µÅ©µµ ¾ø½À´Ï´Ù.±×³É ÀÌ
> ³»¿ë¹Û¿¡ ¾ø½À´Ï´Ù.'
>
>
> The errors I get on import are of this type:
>   ERROR:  invalid byte sequence for encoding "UNICODE": 0xdb20
>
> The data may not be the cleanest, and I have limited control over that.
> But I am wondering if there is any way I can import this data, even if that
> means converting some of the characters into something else.
>
> Thanks,
> Otis
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq



view thread (4+ messages)  latest in thread

Message-ID: <200603202331.43853.rossacher@bluewin.ch>
Permalink:  ../200603202331.43853.rossacher@bluewin.ch/
Also on:    postgresql.org/message-id/200603202331.43853.rossacher@bluewin.ch

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: rossacher@bluewin.ch, ogjunk-pgjedan@yahoo.com
  Subject: Re: Character encoding problems and dump import
  In-Reply-To: <200603202331.43853.rossacher@bluewin.ch>
  References: <20060320202135.86240.qmail@web50302.mail.yahoo.com> <200603202331.43853.rossacher@bluewin.ch>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox