Re: get question mark with Chinese/Japanese character ? - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: get question mark with Chinese/Japanese character ?
Date
Msg-id Pine.BSO.4.56.0508081655330.22483@leary.csoft.net
Whole thread Raw
In response to get question mark with Chinese/Japanese character ?  (Jiangyi <jiangyi@sjtu.edu.cn>)
List pgsql-jdbc

On Mon, 8 Aug 2005, Jiangyi wrote:

> Hello everyone
>      I am now using Jdbc driver(pg74.216.jdbc3.jar) with Postgresql
> 7.4.7 on macosx 10.4.2 . I have a question about the character encoding.
>      I have a program that write data into database. When I change the
> system language to English, the chinese and japanese character data
> inserted into the table will be garabed character. When I change the
> system language to Chinese or japanese, the data inserted into
> postgresql database are all right. I have already set the database
> encoding into UNICODE.
>      How can I to let my program always insert the correct data into
> database regardless the operating system language settings.
>

Changing the system language does not affect how the driver itself
operates.  I suspect the problem may actually be with your loading
program.  Are you doing something like creating String data from
a byte[] that uses the JVM's default encoding instead of specifying
it correctly?

Kris Jurka

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: [PATCH] problem with DatabaseMetaData and mixed case
Next
From: Oliver Jowett
Date:
Subject: Re: [PATCH] problem with DatabaseMetaData and mixed case table