From: Anders Hermansen <anders@yoyo.no>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Guillaume Cottenceau <gc@mnc.ch>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: ERROR: could not convert UTF-8 character 0x00ef to ISO8859-1 possiblesolution
Date: Thu, 28 Apr 2005 09:18:33 +0200
Message-ID: <20050428071833.GB13436@online.no> (raw)
In-Reply-To: <22055.1114612618@sss.pgh.pa.us>
References: <426E685F.1020600@ingenian.com>
<87d5sgecyi.fsf@meuh.mnc.ch>
<20050427104944.GB25361@online.no>
<87y8b4cv7j.fsf@meuh.mnc.ch>
<20050427115434.GB30285@online.no>
<873btccqgw.fsf@meuh.mnc.ch>
<22055.1114612618@sss.pgh.pa.us>
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Looking at the source code, it's clear that it's reporting just the
> first byte of the sequence; the 00 is redundant and probably shouldn't
> be in the message.
Yes the error message can be a bit confusing. I investigated a error I
got when using psql. I did a select and got the message:
"ERROR: could not convert UTF-8 character 0x00e2 to ISO8859-1"
When looking at the database dump the byte sequence is 0xE2 0x80 0x93, which
is valid UTF-8 (U+2013 EN DASH), but can not be converted because the
character is not found in ISO-8859-1.
If I start up a UTF-8 xterm and psql with UNICODE encoding, then everything
works as expected.
> There seem to be two possibilities: either there is a valid 3-byte
> UTF8 character, which cannot be converted to LATIN1; or the alleged
> UTF8 data isn't really UTF8 at all.
Yes. Maybe the error messages can be changed so that what actually went
wrong is more clear? And possibly printing the whole 3-byte sequence?
Anders Hermansen
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-jdbc@postgresql.org
Cc: anders@yoyo.no, tgl@sss.pgh.pa.us, gc@mnc.ch
Subject: Re: ERROR: could not convert UTF-8 character 0x00ef to ISO8859-1 possiblesolution
In-Reply-To: <20050428071833.GB13436@online.no>
References: <426E685F.1020600@ingenian.com> <87d5sgecyi.fsf@meuh.mnc.ch> <20050427104944.GB25361@online.no> <87y8b4cv7j.fsf@meuh.mnc.ch> <20050427115434.GB30285@online.no> <873btccqgw.fsf@meuh.mnc.ch> <22055.1114612618@sss.pgh.pa.us> <20050428071833.GB13436@online.no>
* 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