Re: Is this error correct/possible?
От | Joost Kraaijeveld |
---|---|
Тема | Re: Is this error correct/possible? |
Дата | |
Msg-id | 1124808654.27046.52.camel@panoramix.askesis.nl обсуждение исходный текст |
Ответ на | Re: Is this error correct/possible? (Kris Jurka <books@ejurka.com>) |
Список | pgsql-jdbc |
On Tue, 2005-08-23 at 09:34 -0500, Kris Jurka wrote: > It is allowed to be stored in the database because SQL_ASCII is not a real > encoding. SQL_ASCII allows you to store anything you want and doesn't > require you to tell the server what character set it actually is. The > problem is on the return end, the JDBC driver asks the server to always > return data in UTF-8 by setting the client_encoding appropriately. The > server has no idea what the original encoding of the data was, so it has > no means of converting it to unicode. It may happen to look like > u-double-dot in your particular pgadmin3 client's encoding, but if that > client's encoding was different it would show up as a different character. > This is why the JDBC driver bails out instead of just picking a > random character. OK. > > 2. If so, is this a JDBC bug? > > No. The JDBC documentation clearly states not to choose a SQL_ASCII > database for your data. > > http://jdbc.postgresql.org/documentation/80/your-database.html What if you don't have a choise? E.g. the database is already in SQL_ASCII? Can I convert the database from SQL_ASCII toUNCODE? TIA Joost
В списке pgsql-jdbc по дате отправления: