From: Kris Jurka <books@ejurka.com>
To: Jiangyi <jiangyi@sjtu.edu.cn>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: get question mark with Chinese/Japanese character ?
Date: Mon, 8 Aug 2005 16:58:25 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0508081655330.22483@leary.csoft.net> (raw)
In-Reply-To: <CB5FFC93-A6FA-4D54-9F87-D7FF66181C64@sjtu.edu.cn>
References: <CB5FFC93-A6FA-4D54-9F87-D7FF66181C64@sjtu.edu.cn>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, jiangyi@sjtu.edu.cn
Subject: Re: get question mark with Chinese/Japanese character ?
In-Reply-To: <Pine.BSO.4.56.0508081655330.22483@leary.csoft.net>
References: <CB5FFC93-A6FA-4D54-9F87-D7FF66181C64@sjtu.edu.cn> <Pine.BSO.4.56.0508081655330.22483@leary.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox