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

Re: Charset and encoding

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: rosa(dot)carro(at)ii(dot)uam(dot)es
Cc: pgsql-novice(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: Charset and encoding
Date: 2001-05-09 11:59:07
Message-ID: 20010509205907D.t-ishii@sra.co.jp (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-novice
>     I have defined a database with the encoding SQL_ASCII. I fill the
> database by using embedded SQL. When I insert the value "Señales", it is
> correctly inserted. I read the correct value by typing the query in
> postgres, but when I access this database from a Java program, via JDBC,
> I obtain the value "Seqales". The LANG variable is set to "es_ES"
> (spanish) which I suppose is OK.
> 
>     I have changed this database encoding to LATIN1 and set the client
> characterset to LATIN1 by typing  \encoding LATIN1.
> 
>     Now when I access the data from postgres interface I obtain
> "Se(82f1)ales", and when I get the value through the Java program, I
> obtain
> "Se ñales".
> 
>     Does anybody knows what is happening? Where can I find information
> about this?
>     Thanks in advance,
>     Rosa M. Carro

(82f1) is 0x82 (leading character for LATIN2) + 0xf1 (Spanish 'n'),
that is the intermediate representation in the backend when the
encoding translatin is necessary. My guess is you set the database
encoding to LATIN2, not LATIN1. Can you show me the result of the
query:

select * from pg_database;
--
Tatsuo Ishii

In response to

pgsql-novice by date

Next:From: Rosa Maria Carro SalasDate: 2001-05-09 13:33:23
Subject: Re: Charset and encoding
Previous:From: Eric Naujock Date: 2001-05-09 11:47:32
Subject: Looking for good reference materials for SQL programming.

pgsql-general by date

Next:From: Rosa Maria Carro SalasDate: 2001-05-09 13:33:23
Subject: Re: Charset and encoding
Previous:From: Frank BaxDate: 2001-05-09 11:46:19
Subject: Re: Questions about indexes

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