Re: CP1250 to and from Unicode conversion, how?

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: CP1250 to and from Unicode conversion, how?
Дата
Msg-id 20011103211516Y.t-ishii@sra.co.jp
обсуждение исходный текст
Ответ на CP1250 to and from Unicode conversion, how?  ("Nikola Milutinovic" <Nikola.Milutinovic@ev.co.yu>)
Список 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
JDBCconnection. 
>
> >:-(
>
> 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
commitsuch an act, could you enlighten me? What is going on? 
>
> Nix.

В списке pgsql-general по дате отправления:

Предыдущее
От: Gunnar Lindholm
Дата:
Сообщение: Re: how do the pro's do this? (still a newbie)
Следующее
От: elwood@agouros.de (Konstantinos Agouros)
Дата:
Сообщение: Sum(time) possible?