pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: noreply@pgfoundry.org
To: noreply@pgfoundry.org
Subject: [ psqlodbc-Bugs-1000836 ] invalid byte sequence for encoding & amp; quot; UTF8& amp; quot; : 0x92
Date: Tue, 19 Dec 2006 04:42:08 +0000 (UTC)
Message-ID: <20061219044208.9B190216E5B@pgfoundry.org> (raw)

Bugs item #1000836, was opened at 2006-12-12 15:26
You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000836&group_id=1000125

Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Farid Zidan (faridz)
>Assigned to: Hiroshi Inoue (hinoue)
Summary: invalid byte sequence for encoding &amp;amp;quot;UTF8&amp;amp;quot;: 0x92

Initial Comment:
Example,

create table test_char (
code                 CHAR(5)              not null,
description          VARCHAR(50)          not null
constraint pk_test_char primary key (code)
);

insert into
test_char values ('TEST','description');

update test_char
set
description = "Destruction of add’l lesions -del 1998"
where
code = 'TEST'

Gets this error message:
Error: ERROR: invalid byte sequence for encoding "UTF8": 0x92;
Error while executing the query (State:22021, Native Code: 7)


This also happens if you try to execute the update using SQLExecDirect api call. Database encoding is UTF8. Driver PostgreSQL ANSI 8.02.02.03


----------------------------------------------------------------------

>Comment By: Hiroshi Inoue (hinoue)
Date: 2006-12-19 04:42

Message:
The snapshot dll at http://www.geocities.jp/inocchichichi/psqlodbc/index.html
would set the client_encoding automaically for code pages
125x if the server supports the client_encoding win125x.

----------------------------------------------------------------------

Comment By: Farid Zidan (faridz)
Date: 2006-12-13 18:04

Message:
That does it. Now I am able to execute the update with no
error. Thanks.

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-12-13 17:31

Message:
Please try to set the Connect Settings option e.g.
  set client_encoding to win1252
.

If I improve the automatic client_encoding setting
 mechanism, such a setting may not be needed.

regards,
Hiroshi Inoue

----------------------------------------------------------------------

Comment By: Farid Zidan (faridz)
Date: 2006-12-13 16:21

Message:
Not sure how to set client encoding for the driver. My
machine is Windows XP SP2 and PostgreSQL server version is
the latest 8.2

I am attaching global mylog file

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-12-13 16:02

Message:
Do you want to set the client_encoding to WIN1252 ?
The client_encoding seems to be set to the one other
than WIN1252 but I can't see the setting in your log.
If you set the global Mylog option, you can see the
setting in the log.

BTW is your server version < 8.1 ?
WIN1252 wasn't supported in versions before 8.1.

----------------------------------------------------------------------

Comment By: Farid Zidan (faridz)
Date: 2006-12-13 14:45

Message:
Mylog is attached.

I have reduced the string to the minimum that duplicates
this error.

update test_char
set
description = 'add’l'
where
code = 'TEST'

You get this error if you execute this statement from an
ODBC client such as WinSQL, etc. Also by calling SQLExecDirect

No error if you use PostgreSQL PgAdmin III query tool ( does
not use ODBC ), but updated info is incorrect.




----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-12-12 23:50

Message:
Could you show me the Mylog output ?
BTW I can't see the character between 'Destruction of add l'
and 'lesions -del 1998' here. Is it the character corrsponding
to 0x92 ?  

regards,
Hiroshi Inoue

----------------------------------------------------------------------

You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000836&group_id=1000125



Message-ID: <20061219044208.9B190216E5B@pgfoundry.org>
Permalink:  ../20061219044208.9B190216E5B@pgfoundry.org/
Also on:    postgresql.org/message-id/20061219044208.9B190216E5B@pgfoundry.org

 · 

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-odbc@postgresql.org
  Cc: noreply@pgfoundry.org
  Subject: Re: [ psqlodbc-Bugs-1000836 ] invalid byte sequence for encoding &amp; amp; quot; UTF8&amp; amp; quot; : 0x92
  In-Reply-To: <20061219044208.9B190216E5B@pgfoundry.org>
  References: <20061219044208.9B190216E5B@pgfoundry.org>

* 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