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