Re: pg jdbc driver - Mailing list pgsql-general

From Kris Jurka
Subject Re: pg jdbc driver
Date
Msg-id Pine.BSO.4.56.0408082020450.18965@leary.csoft.net
Whole thread Raw
In response to pg jdbc driver  (Dino Nardini <dino@rivendellsoftware.com>)
Responses Re: pg jdbc driver  (Dino Nardini <dino@rivendellsoftware.com>)
List pgsql-general

On Sun, 8 Aug 2004, Dino Nardini wrote:

> However, when I tested the same data with ColdFusion MX (built on a Java
> platform), I ran into problems.  The french characters were either throwing
> "Invalid character..." errors, or displaying as garbage.  I'm guessing that
> CFMX was trying to convert the characters from SQL_ASCII to something else
> (UTF-8?) somewhere between the database and the web page.

The invalid character data errors are coming from the JDBC driver.  When
it connects to the database it asks the server to send it data using UTF-8
regardless of the actual database encoding.  The server cannot convert
SQL_ASCII to UTF-8 and simply returns the SQL_ASCII data.  The JDBC driver
is expected UTF-8 data and chokes on this, so as you mentioned you will
need to dump and restore into a database with a "real" encoding.  This
doesn't necessarily have to be unicode, but often makes the most sense.

Kris Jurka

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error >>syntax error<< at >>$1<< at character 53
Next
From: Tom Lane
Date:
Subject: Re: CREATE FUNCTION