Re: Problems with writing EUC-JP/Unicode to console or file - Mailing list pgsql-jdbc

From Jean-Christian Imbeault
Subject Re: Problems with writing EUC-JP/Unicode to console or file
Date
Msg-id 3EF6CE76.60907@mega-bucks.co.jp
Whole thread Raw
In response to Problems with writing EUC-JP/Unicode to console or file  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Responses Re: Problems with writing EUC-JP/Unicode to console or file
List pgsql-jdbc
Csaba Nagy wrote:
> I suspect that your machine's default encoding and the encoding used by
> your Java program doesn't match.

[snip]

>i.e. explicitly tell to your Java
> writer code what encoding to use, and explicitly tell to the editor what
> encoding to use when opening the file. Otherwise they'll use their
> default encodings, which might not match.

Very true. I'll look up how to specify the encoding when writing to
file. I don't know that it is possible when writing to the console though.

*But* I must point out that I am writing quite a bit of data, in
japanese, to file and the console and *all* of it come out correctly
*except* for that one character ...

I *will* check into how to specify the encoding but I don't think that
is the problem as everything but the one character comes out out right.
And as I had said, if I hard-code the string to be printed it comes out
right ... only when the string is retrieved from the database does it
come out wrong ...

Thanks,

Jean-Christian Imbeault


pgsql-jdbc by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: Problems with writing EUC-JP/Unicode to console or file
Next
From: Fernando Nasser
Date:
Subject: Re: Urgent : JDBC problem in PostgreSql for Linux