Skip site navigation (1) Skip section navigation (2)

Re: [SQL] ERROR: invalid byte sequence for encoding "UTF8": 0x92

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Claus Guttesen <kometen(at)gmail(dot)com>
Cc: Karthikeyan Sundaram <skarthi98(at)hotmail(dot)com>, pgsql-admin(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] ERROR: invalid byte sequence for encoding "UTF8": 0x92
Date: 2007-03-21 03:32:44
Message-ID: 20070321033244.GA39959@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-sql
On Tue, Mar 20, 2007 at 09:06:25PM +0100, Claus Guttesen wrote:
> >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)
> 
> Try to modify client_encoding in postgresql.conf to utf8 and restart your 
> db.

The data is apparently not UTF-8 so client_encoding needs to be set
to something else.  0x92 is a hint that the encoding might be
Windows-1252 or Windows-1250 since that byte represents the right
single quotation mark in those encodings; that's a common character
in data that originated in Windows.  Also, client_encoding can be set
by the client without having to restart the backend.

-- 
Michael Fuhr

In response to

Responses

pgsql-admin by date

Next:From: Devrim GÜNDÜZDate: 2007-03-21 06:12:05
Subject: Re: which distro, or to build
Previous:From: David BearDate: 2007-03-21 01:16:38
Subject: Re: which distro, or to build

pgsql-sql by date

Next:From: StefanDate: 2007-03-21 06:11:37
Subject: unsubscribe
Previous:From: Michael FuhrDate: 2007-03-21 03:02:59
Subject: Re: Substitute

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group