Re: Character Encoding problem

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: antony baxter <antony(dot)baxter(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Character Encoding problem
Date: 2008-04-07 03:48:54
Message-ID: 47F999A6.40107@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Craig Ringer 2008-04-07 04:34:44 Re: Character Encoding problem
Previous Message Craig Ringer 2008-04-07 03:38:58 Re: Character Encoding problem