Re: Problems with writing EUC-JP/Unicode to console or file

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
Cc: Postgres JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Problems with writing EUC-JP/Unicode to console or file
Date: 2003-06-23 09:36:04
Message-ID: 3EF6CA04.5080909@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Csaba Nagy wrote:
> This sounds like your terminal can't display that character.

Hum ... good idea. But I don't think this is the problem in my case as I
am using the japanese version of Windows 2000.

Also if I hard-coded the string to be written then it is displayed fine
on the console or in the file, like this:

String string = "ー";
System.out.println(string);

The above code prints out fine.

But if 'string' is gotten from the database it does not display properly
when printed out or written to file. But strangely enough it does
display properly in GUI components.

Maybe the GUI and the OS use different, and incompatible, unicode fonts?

I'm thinking that the unicode byte representation of "ー" in the
database and does not map to a valid character in the font set that my
OS uses? That or the code point (is that the right word?) that pg uses
for this character and is the not the same as Java uses? (I remember
some talk about the unicode translation being moved from the driver to
the back end and some changes in the translation tables or something
like that?)

I'm really at a loss here and any advice on what I can do to find the
root cause and hopefully a fix for this are very much appreciated as my
application depends on being able to write this character to file.

Thanks!

Jean-Christian Imbeault

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Paul Thomas 2003-06-23 09:45:18 Re: OODBMS - PostgreSql
Previous Message Csaba Nagy 2003-06-23 08:58:35 Re: Problems with writing EUC-JP/Unicode to console or file