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 911579DC9C0 for ; Mon, 20 Mar 2006 19:21:58 -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 11287-06 for ; Mon, 20 Mar 2006 19:22:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail21.bluewin.ch (mail21.bluewin.ch [195.186.18.66]) by postgresql.org (Postfix) with ESMTP id 577189DC9C1 for ; Mon, 20 Mar 2006 19:21:56 -0400 (AST) Received: from [192.168.1.74] (83.77.246.26) by mail21.bluewin.ch (Bluewin 7.2.071) id 441EA3500002D693; Mon, 20 Mar 2006 23:21:58 +0000 From: Ivo Rossacher To: pgsql-admin@postgresql.org Subject: Re: encoding question Date: Tue, 21 Mar 2006 00:21:42 +0100 User-Agent: KMail/1.8.2 Cc: "Ben K." References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200603210021.42784.rossacher@bluewin.ch> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200603/186 X-Sequence-Number: 20943 Am Montag, 20. M=E4rz 2006 23.56 schrieb Ben K.: > Hi, > > My main server is on Solaris (LANG=3DC), postgresql 8.1.0, with encoding > SQL_ASCII. SQL_ASCII is not an encoding. It marks that there is no encoding and theref= ore=20 no check of the stored byte codes. This means that the client is fully=20 responsible for the correctness of the byte codes. If the client does no=20 checks on the byte codes it is possible for the user to enter non ascii=20 characters which will create trubles when sent to the unicode server. You can find several different solutions for this kind of issues in the=20 archives. Which to use depends on the details of your problem. Best Regards Ivo > > I'm trying to set up a backup server on linux (LANG=3Den_US.UTF-8), with > encoding UTF8. > > I thought UTF8 was safe if all I have is ascii, since there was a relevant > discussion in this list a short while ago, but I'm getting this error, for > a few records (out of tens of thousands in that database). > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > ERROR: invalid UTF-8 byte sequence detected near byte 0x85 > CONTEXT: COPY tblcoursesinfo, line 30, column title: "Seminar in<85> > ..." > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > The dump was created by 8.1.0's pg_dump with no options. > > That line in the dump has the following contents. > > Text: > > n<85> Knowledg > > Binary: > > 02e2100: 6e85 2020 2020 2020 2020 2020 2020 2020 n. > 02e2110: 2020 2020 2020 2020 2020 2020 2020 2020 > 02e2120: 2020 2020 2020 2020 2020 2020 2020 2020 > 02e2130: 2020 2020 2020 2020 2020 2020 2020 2020 > 02e2140: 2020 2020 2020 2020 2020 2020 2020 2020 > 02e2150: 2020 2020 2020 2020 2020 2020 2020 2020 > 02e2160: 2020 2020 2020 2020 2020 2020 2020 2020 > 02e2170: 2020 2020 2020 2009 4b6e 6f77 6c65 6467 .Knowledg > > Where could this be coming from? Would appreciate help. > > > Regards, > > Ben K. > Developer > http://benix.tamu.edu > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend