Re: Character Encoding problem - Mailing list pgsql-jdbc

From Craig Ringer
Subject Re: Character Encoding problem
Date
Msg-id 47F999A6.40107@postnewspapers.com.au
Whole thread Raw
In response to Re: Character Encoding problem  ("antony baxter" <antony.baxter@gmail.com>)
List pgsql-jdbc
antony baxter wrote:
> One thing I forgot to add; I also tried e.g.:
>
>   ps.setString(1, new
> String(Charset.forName("UTF-8").encode(myString).array(), "UTF-8"));
>
That should just be a no-op in encoding terms. Could the ByteBuffer
returned by encode(...) contain trailing NULL values that CharsetDecoder
retains in the decoded string?

Are the lengths of `myString' and the converted string the same?

If you print them out character by character what're the character values?

--
Craig Ringer

pgsql-jdbc by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Character Encoding problem
Next
From: Craig Ringer
Date:
Subject: Re: Character Encoding problem