Re: ArrayIndexOutOfBoundsException in Encoding.decodeUTF8()

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: ArrayIndexOutOfBoundsException in Encoding.decodeUTF8()
Дата
Msg-id 3E1C9677.7040700@xythos.com
обсуждение исходный текст
Ответ на Re: ArrayIndexOutOfBoundsException in Encoding.decodeUTF8()  (Joseph Shraibman <jks@selectacast.net>)
Ответы Re: ArrayIndexOutOfBoundsException in Encoding.decodeUTF8()  (Joseph Shraibman <jks@selectacast.net>)
Список pgsql-jdbc
Joseph,

In postgres UNICODE means utf8.

--Barry

Joseph Shraibman wrote:
> Barry Lind wrote:
>
>> Joseph,
>>
>> The problem is that your database claims to be ASCII, but you are
>> storing non-ascii data in it.
>>
>> As of 7.3 the jdbc driver has the server convert from the database
>> character set to UTF8.  Then send the data to the driver in UTF8 and
>> the driver then decodes the UTF8 to java unicode.
>
>
> I see this in my postgres log when I connect via jdbc:
>
> LOG:  query: set datestyle to 'ISO'; select version(), case when
> pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else
> getdatabaseencoding() end;
> LOG:  query: set client_encoding = 'UNICODE'; show autocommit
>
> So if client_encoding is unicode why is the driver trying to convert
> from UTF8?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>



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

Предыдущее
От: Felipe Schnack
Дата:
Сообщение: server-side prepare
Следующее
От: Joseph Shraibman
Дата:
Сообщение: Re: ArrayIndexOutOfBoundsException in Encoding.decodeUTF8()