Re: get question mark with Chinese/Japanese character ?

From: Kris Jurka <books(at)ejurka(dot)com>
To: Jiangyi <jiangyi(at)sjtu(dot)edu(dot)cn>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: get question mark with Chinese/Japanese character ?
Date: 2005-08-08 21:58:25
Message-ID: Pine.BSO.4.56.0508081655330.22483@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-08-08 22:07:17 Re: [PATCH] problem with DatabaseMetaData and mixed case table
Previous Message Kris Jurka 2005-08-08 21:55:30 Re: [PATCH] problem with DatabaseMetaData and mixed case