Re: charset property is not working

From: Kris Jurka <books(at)ejurka(dot)com>
To: Katalina Marcos <kmarcos(at)mazda(dot)com(dot)co>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: charset property is not working
Date: 2004-05-16 20:33:09
Message-ID: Pine.BSO.4.56.0405161522510.29033@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 13 May 2004, Katalina Marcos wrote:

> I'm using postgresql 7.3.2 (datasource) and jboss

Is this a 7.3.2 server or 7.3.2 jdbc driver or both?

>
> When I try to query a table , I get this error:
>
> Invalid character data was found. This is most likely caused by stored
> data containing characters that are invalid for the character set the
> database was created in. The most common example of this is storing
> 8bit data in a SQL_ASCII database.
>
> LOG: query: s
> ERROR: parser: parse error at or near "s" at character 1
> FATAL: Socket command type e unknown

What encoding did you create the database in? (psql's \l command will
show you.) If it's not unicode you won't be able to store the full range
of unicode characters correctly in it.

>
> So, I try to set the connection property in the datasource descriptor:
> <connection-property name="charSet">UNICODE</connection-property>

The charSet property is only valid when connecting to 7.2 and earlier
databases. Starting with the 7.3 series multibyte support was enabled in
the default install, so the client_encoding is always set to unicode by
the driver.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-05-16 20:36:40 Re: IPv6 connection / JDBC (?)
Previous Message Kris Jurka 2004-05-16 20:21:28 Re: [BUG?] Extreme dates