dbTalk Databases Forums  

UTF-8 -> ISO8859-1 conversion problem

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss UTF-8 -> ISO8859-1 conversion problem in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cott Lang
 
Posts: n/a

Default UTF-8 -> ISO8859-1 conversion problem - 10-29-2004 , 11:12 AM






ERROR: could not convert UTF-8 character 0x00ef to ISO8859-1

Running 7.4.5, I frequently get this error, and ONLY on this particular
character despite seeing quite a bit of 8 bit. I don't really follow why
it can't be converted, it's the same character (239) in both character
sets. Databases are in ISO8859-1, JDBC driver is defaulting to UTF-8.

Am I flubbing something up? I'm probably going to (reluctantly) convert
to UTF-8 in the database at some point, but it'd sure be nice if this
worked without that.

thanks!







---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #2  
Old   
Ian Pilcher
 
Posts: n/a

Default Re: UTF-8 -> ISO8859-1 conversion problem - 10-29-2004 , 03:56 PM






Cott Lang wrote:
Quote:
ERROR: could not convert UTF-8 character 0x00ef to ISO8859-1

Running 7.4.5, I frequently get this error, and ONLY on this particular
character despite seeing quite a bit of 8 bit. I don't really follow why
it can't be converted, it's the same character (239) in both character
sets. Databases are in ISO8859-1, JDBC driver is defaulting to UTF-8.

Am I flubbing something up? I'm probably going to (reluctantly) convert
to UTF-8 in the database at some point, but it'd sure be nice if this
worked without that.

Can you post a code snippet? There's really no such thing as a "UTF-8
character". Java chars and Strings are UTF-16 (or maybe UCS-2 in JVMs
prior to 1.5), not UTF-8.

Note that 0xEF should not appear by itself in a UTF-8 bytestream. The
UTF-8 representation of U+00EF is 0xC3 0xAF.

--
================================================== ======================
Clearly, there is no political benefit to expediting the admission of
legal immigrants into the United States. Nevertheless, I believe that
our elected officials have an obligation to do more than simply pander
to the thinly veiled racism of their constituents.
Ian Pilcher
================================================== ======================


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.