Re: Unicode confusion

Поиск
Список
Период
Сортировка
От Ian Barwick
Тема Re: Unicode confusion
Дата
Msg-id 200305122247.22745.barwick@gmx.net
обсуждение исходный текст
Ответ на Re: Unicode confusion  ("Chris Palmer" <chris.palmer@geneed.com>)
Список 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 по дате отправления:

Предыдущее
От: Andrew Ayers
Дата:
Сообщение: Re: VARCHAR performance issue
Следующее
От: John DeSoi
Дата:
Сообщение: create type question