From: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> |
---|---|
To: | Nikola(dot)Milutinovic(at)ev(dot)co(dot)yu |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: CP1250 to and from Unicode conversion, how? |
Date: | 2001-11-03 12:15:16 |
Message-ID: | 20011103211516Y.t-ishii@sra.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
It might be a JDBC driver issue. Ask the JDBC gurus.
If you believe it's the problem of the backend, please give me
reproducible examples using psql.
--
Tatsuo Ishii
> Hi.
>
> Problems again.
>
> I have created a DB with encoding set to LATIN2, created tables.
> Connected to the database with psql, set encoding to WIN1250, imported data ("\copy ...")
> The data is there, definitely. Encoding is different from WIN1250, so I guess the encoding is really Latin-2.
>
> Now comes my creeping horror. I have a test Java application which connects to the database, taking one argument; ENCODING.
>
> This is what comes out:
>
> <NO ENCODING>
> ---------------------------------------------------------------------
> Connecting with: jdbc:postgresql://legba.ev.co.yu/mercury
>
> ID: 39 NAME: Anica SURNAME: Ivkovi?
> ID: 87 NAME: Sa?a SURNAME: Ivkovi?
> ID: 130 NAME: Ljubica SURNAME: Ivkovi?
> ---------------------------------------------------------------------
>
> <LATIN-1>
> ---------------------------------------------------------------------
> Connecting with: jdbc:postgresql://legba.ev.co.yu/mercury?charSet=LATIN1
>
> ID: 39 NAME: Anica SURNAME: Ivkovic
> ID: 87 NAME: Saaa SURNAME: Ivkovic
> ID: 130 NAME: Ljubica SURNAME: Ivkovic
> ---------------------------------------------------------------------
>
> <LATIN-2>
> ---------------------------------------------------------------------
> Connecting with: jdbc:postgresql://legba.ev.co.yu/mercury?charSet=LATIN2
>
> ID: 39 NAME: Anica SURNAME: Ivkovi?
> ID: 87 NAME: Sa?a SURNAME: Ivkovi?
> ID: 130 NAME: Ljubica SURNAME: Ivkovi?
> ---------------------------------------------------------------------
>
> <UTF-8>
> ---------------------------------------------------------------------
> Connecting with: jdbc:postgresql://legba.ev.co.yu/mercury?charSet=UNICODE
>
> Exception in thread "main" java.sql.SQLException:
> at org.postgresql.Connection.ExecSQL(Connection.java, Compiled Code)
> at org.postgresql.jdbc2.Statement.execute(Statement.java, Compiled Code)
> at org.postgresql.jdbc2.Statement.executeQuery(Statement.java, Compiled Code)
> at test2PostgreSQL.main(test2PostgreSQL.java, Compiled Code)
> ---------------------------------------------------------------------
>
> So, <No encoding> and <Latin-2> give me "?", <Latin-1> gives me what looks like Latin-2 output and <Unicode> crashes JDBC connection.
>
> >:-(
>
> Looks like I'm in for some serious learning...
>
> If it is of any help, on the "Legba.ev.co.yu", for <Unicode> case, which crashed JDBC, PostMaster is spitting out:
>
> ERROR: parser: parse error at or near "t?"
> FATAL 1: Socket command type S unknown
>
> I'm taking my "mining helmet" out, getting an axe from the closet and preparing to dig into the source. Before I commit such an act, could you enlighten me? What is going on?
>
> Nix.
From | Date | Subject | |
---|---|---|---|
Next Message | Culley Harrelson | 2001-11-03 13:49:54 | Re: Fwd: Re: deleting a child table |
Previous Message | Andy | 2001-11-03 10:02:45 | Porting Web application written in Oracle 8 PL/SQL to Postgresql |