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()
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.
pgsql-jdbc by date
|Next:||From: Oliver Jowett||Date: 2008-08-01 23:18:45|
|Subject: Re: Encoding issues|
|Previous:||From: tivvpgsqljdbc||Date: 2008-07-30 09:12:20|
|Subject: Re: numeric type|