X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 1284C9DC9C0 for ; Mon, 20 Mar 2006 18:51:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91571-07 for ; Mon, 20 Mar 2006 18:51:50 -0400 (AST) X-Greylist: delayed 00:19:48.847757 by SQLgrey- Received: from mail13.bluewin.ch (mail13.bluewin.ch [195.186.18.62]) by postgresql.org (Postfix) with ESMTP id D3D589DC941 for ; Mon, 20 Mar 2006 18:51:46 -0400 (AST) Received: from [192.168.1.74] (83.77.246.26) by mail13.bluewin.ch (Bluewin 7.2.071) id 441EA1DA0002B69E; Mon, 20 Mar 2006 22:31:59 +0000 From: Ivo Rossacher To: pgsql-admin@postgresql.org Subject: Re: Character encoding problems and dump import Date: Mon, 20 Mar 2006 23:31:43 +0100 User-Agent: KMail/1.8.2 Cc: ogjunk-pgjedan@yahoo.com References: <20060320202135.86240.qmail@web50302.mail.yahoo.com> In-Reply-To: <20060320202135.86240.qmail@web50302.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200603202331.43853.rossacher@bluewin.ch> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200603/184 X-Sequence-Number: 20941 Am Montag, 20. M=C3=A4rz 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: > > =3D> \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 w= as=20 taken. (there is a line like set client_encoding =3D .... somewhere at the= =20 beginning of the dump) There where some changes within the unicode handling some time ago. If the= =20 dump was taken by an other server version there migth be differences. (sear= ch=20 the archives, there are serveral threads about the issue. Best regards Ivo > > Characters that cause problems during the import are things like: > =C3=A9 and other characters from the Extended ASCII table (c.f. bottom of > http://www.lookuptables.com/ ) Also: > '=C3=87=C3=91=C2=B1=C3=9B=C3=80=C3=8C =C3=81=C2=A6=C2=B4=C3=AB=C2=B7=C3= =8E =C2=B5=C3=87=C2=B4=C3=82=C3=81=C3=B6 =C2=BD=C3=87=C3=87=C3=A8... =C2=BF= =C2=A9=C2=B1=C3=A2=C2=BF=C2=A1=C2=B4=C3=82 =C2=BE=C3=86=C2=B9=C2=AB =C2=B8= =C2=B5=C3=85=C2=A9=C2=B5=C2=B5 =C2=BE=C3=B8=C2=BD=C3=80=C2=B4=C3=8F=C2=B4= =C3=99.=C2=B1=C3=97=C2=B3=C3=89 =C3=80=C3=8C > =C2=B3=C2=BB=C2=BF=C3=AB=C2=B9=C3=9B=C2=BF=C2=A1 =C2=BE=C3=B8=C2=BD=C3=80= =C2=B4=C3=8F=C2=B4=C3=99.' > > > 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 th= at > 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