Re: UTF-8 -> ISO8859-1 conversion problem
От | Ian Pilcher |
---|---|
Тема | Re: UTF-8 -> ISO8859-1 conversion problem |
Дата | |
Msg-id | cluaqf$smg$1@sea.gmane.org обсуждение исходный текст |
Ответ на | UTF-8 -> ISO8859-1 conversion problem (Cott Lang <cott@internetstaff.com>) |
Список | pgsql-general |
Cott Lang wrote: > 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 ========================================================================
В списке pgsql-general по дате отправления: