Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id C42399FBA1C for ; Tue, 20 Mar 2007 17:21:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 59595-04 for ; Tue, 20 Mar 2007 17:20:43 -0300 (ADT) X-Greylist: delayed 00:17:30.804868 by SQLgrey-1.7.4 Received: from mail21.bluewin.ch (mail21.bluewin.ch [195.186.18.66]) by postgresql.org (Postfix) with ESMTP id 126139FBA77 for ; Tue, 20 Mar 2007 17:20:48 -0300 (ADT) Received: from [192.168.1.74] (83.78.65.22) by mail21.bluewin.ch (Bluewin 7.3.121) id 45F510CB00281FED for pgsql-admin@postgresql.org; Tue, 20 Mar 2007 20:03:13 +0000 From: Ivo Rossacher To: pgsql-admin@postgresql.org Subject: Re: ERROR: invalid byte sequence for encoding "UTF8": 0x92 Date: Tue, 20 Mar 2007 21:03:12 +0100 User-Agent: KMail/1.9.5 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200703202103.12280.rossacher@bluewin.ch> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/137 X-Sequence-Number: 24961 Am Dienstag, 20. M=E4rz 2007 20:34 schrieb Karthikeyan Sundaram: > Hi, > > I am using postgres 8.2.3. I have recently converted my database from > sql-ascii to UTF8. I have a portal which calls a perl program to insert > the data into the database. > > While inserting, I am getting an error message > > DBD::Pg::st execute failed: ERROR: invalid byte sequence for encoding > "UTF8": 0x92 > [for Statement "INSERT INTO longdescs (bug_id, who, bug_when, thetext, > isprivate) > > > How can I set the client encoding in perl. Can somebody help me? > > Regards > skarthi After the connection is done send set client_encoding to '' to the server. The server then will convert the strings back and=20 forward for you. Se manual chapter 21.2 Character Set Support for more details. Best regards Ivo > > _________________________________________________________________ > Get a FREE Web site, company branded e-mail and more from Microsoft Office > Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/ > > > ---------------------------(end of broadcast)--------------------------- > TIP 7: You can help support the PostgreSQL project by donating at > > http://www.postgresql.org/about/donate