Small problem with special characters

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Small problem with special characters
Дата
Msg-id ec9jsb$v5e$1@sea.gmane.org
обсуждение исходный текст
Ответы Re: Small problem with special characters
Список pgsql-jdbc
Hello,

I'm having a small problem with inserting german umlauts. The PG database was
created with the default code page (by accident) and thus ended up with 'WIN1251'.

Now from within a Java program I'm trying to insert a value into the database
that contains the character 'ö'. Now when doing that, the JDBC driver throws an
error:

character 0xc3b6 of encoding "UTF8" has no equivalent in "WIN1251" [SQL
State=22P05]

What I don't understand, is that this character is contained in the windows code
page. The value itself is retrieved from a JDBC connection to a HSQLDB database,
so the string handling is Java internal only.

I can convert the database to UTF8 that is not the problem, the main reason I'm
writing, is that I'd like to understand what is going on here.

Does this mean, that I can only access UTF8 enabled databases with the JDBC driver?

Thanks
Thomas


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "James Im"
Дата:
Сообщение: Re: SQL query never ends
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Small problem with special characters