Re: pg jdbc driver

From: Kris Jurka <books(at)ejurka(dot)com>
To: Dino Nardini <dino(at)rivendellsoftware(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg jdbc driver
Date: 2004-08-09 01:23:58
Message-ID: Pine.BSO.4.56.0408082020450.18965@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message lec 2004-08-09 01:43:38 Losing records when server hang
Previous Message Dino Nardini 2004-08-09 01:22:41 Re: pg jdbc driver