Skip site navigation (1) Skip section navigation (2)

Re:

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Joel Seguillon <seguij(at)free(dot)fr>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re:
Date: 2001-04-03 13:17:18
Message-ID: 986303838.3ac9cd5ed386f@webmail.retep.org.uk (view raw or flat)
Thread:
Lists: pgsql-jdbc
Quoting Joel Seguillon <seguij(at)free(dot)fr>:

>     Hi, 
>   I'm trying to use JDBC driver for postgres but have a problem with
> UNICODE.
>   I can insert UNICODE values but I can't compare them unless they are
> under 
> 00ff...
> 
>   When I try to compare values that are over 00ff always return true : 
>    // inserting a Unicode value in the database
>    smt.executeUpdate("insert into test values ('\u0123')");
> 
>    // not the same unicode value selects the same line !!!
>    smt.executeQuery("select * from test where test = '\u0223'");
> 
>   (but '\u0064' and '\0034' are not the same :)) 

As executeQuery & executeUpdate pass the query to the backend without any 
modifications (well a few occasionally but not in this case), this looks like a 
backend type of problem.

Forwarding to the hackers list.

> I compiled the postgres.jar with the jdbc2 and the 7.0.3 version,
> compiled 
> postgresql with --enable-multibyte and created my database with -E
> UNICODE.
> 
> I also use the Properties class to connect to my base to specifie that i
> wan't 
> to use Utf-8.

The key is "charSet" case sensitive...

Peter

-- 
Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

In response to

  • at 2001-04-02 16:30:31 from Joel Seguillon

pgsql-jdbc by date

Next:From: Gabriel GarcĂ­aDate: 2001-04-03 15:54:54
Subject: Help for java
Previous:From: Joel SeguillonDate: 2001-04-02 16:30:31
Subject:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group