Encoding Issue with UNICODE

Поиск
Список
Период
Сортировка
От fritz-bayer@web.de (Fritz Bayer)
Тема Encoding Issue with UNICODE
Дата
Msg-id a9c0aa9e.0504080740.27bf6951@posting.google.com
обсуждение исходный текст
Ответы Re: Encoding Issue with UNICODE  ("Daniel Verite" <daniel@manitou-mail.org>)
Re: Encoding Issue with UNICODE  ("Magnus Naeslund(t)" <mag@fbab.net>)
Список pgsql-general
Hello,

I`m using postgresql 7.2.1. According to the following lines data in
my database gets encoded as unicode. Server and client communication
seems to use unicode as well:

woody=# select version();
version
---------------------------------------------------------------
PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.95.4
(1 row)

woody=# select getdatabaseencoding();
getdatabaseencoding
---------------------
UNICODE
(1 row)

woody=# show client_encoding;
NOTICE:  Current client encoding is 'UNICODE'
SHOW VARIABLE

I have a java program, which writes words containing german umlauts
like äöü into the database. As you probably know, those characters
belong to the ISO-8859-1 character encoding set.

In my java webapplication those umlauts (äöü) get displayed correctly.
So they actually get stored correctly in the database.

However, when I use postgresql's psql client I those characters get
displayed incorretly.

For example the city name "münchen" gets displayed as "mÌnchen". Not
so in my webapplication. There the city name in the HTML code appears
corretly as "münchen".

So why is psql not displaying the unicode characters correclty? Or
could it be that my xterm can not handle unicode characters? But since
ü is also LATIN1 (ISO 8859 1) would expect that this should not be a
problem.

Can somebody help me out here? Should I create the databases as LATIN1
instead of UNICODE? And how can I transform my current databases into
LATIN1 ones? They should be compatible, because all characters I use
are only äöü, which are downward compatible.

Fritz

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

Предыдущее
От: Michelle Konzack
Дата:
Сообщение: error with vacuumdb
Следующее
От: "Vinod Viswanathan"
Дата:
Сообщение: Duplicate records in table