Encoding issues

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Encoding issues
Дата
Msg-id 1217613920.16813.168.camel@dell.linuxdev.us.dell.com
обсуждение исходный текст
Ответы Re: Encoding issues  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
MD5Digest.encode() calls password.getBytes("US-ASCII") and the same for
the username. This is wrong, because when java converts a non-ASCII
character to US-ASCII, it replaces it with a "?".

Similarly for sendStartupPacket()
in /org/postgresql/core/v3/ConnectionFactoryImpl.java
and /org/postgresql/core/v2/ConnectionFactoryImpl.java.

I'm not sure exactly what it _should_ do, because the connection itself
is done with ASCII (client_encoding is not yet set).

Rather than trying to convert from characters to ASCII, maybe it should
just get the byte sequence, and send that? That appears to be how other
clients (like libpq) work.

It still fails when the client and server encoding don't match, however.

Regards,
    Jeff Davis


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

Предыдущее
От: tivvpgsqljdbc@gtech-ua.com
Дата:
Сообщение: Re: numeric type
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Encoding issues