Re: Unicode confusion - Mailing list pgsql-general

From Ian Barwick
Subject Re: Unicode confusion
Date
Msg-id 200305122247.22745.barwick@gmx.net
Whole thread Raw
In response to Re: Unicode confusion  ("Chris Palmer" <chris.palmer@geneed.com>)
List pgsql-general
On Monday 12 May 2003 20:49, Chris Palmer wrote:
> Ian Barwick writes:
> > If it's any help, your code should work as expected. The hex
> > data you see (3F3F0A) is two question marks and an \n; I would
> > guess Java is not able to display the unicode characters in your
> > environment and is replacing them with '?'.
>
> What part of my environment are you referring to? It's not the terminal
> emulator (which Java has no knowledge of). Java does Unicode (in fact,
> there is no other choice). Is there some locale setting I can use? Is there
> a parameter I can use with the Pg JDBC driver or Connection object?

OK, put it another way: Java is not able to or does not want to print
the specified Unicode characters (the Yin / Yang symbol and something
squiggly IIRC) to your STDOUT. This is nothing to do with the JDBC connection.
I presume Java looks at your locale setting, maybe Google knows the
answer ;-).

Using a UTF-8 capable terminal (I use mlterm or konsole, no idea what options
there are in Windows) the characters retrieved from Postgres and which are now
in Java's internal Unicode encoding (which one I don't recall) can be
displayed by converting them into UTF-8.


Ian Barwick
barwick@gmx.net


pgsql-general by date:

Previous
From: Andrew Ayers
Date:
Subject: Re: VARCHAR performance issue
Next
From: John DeSoi
Date:
Subject: create type question