Unicode support problem

Поиск
Список
Период
Сортировка
От Jatinder Sangha
Тема Unicode support problem
Дата
Msg-id BCE42FB579A9854BA371EEAF4A6A6E30021EEF@coalitiondev-sv.CoalitionDev.local
обсуждение исходный текст
Ответы Re: Unicode support problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Unicode support problem  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Список pgsql-general
Hi all,

I'm having a problem with unicode support in postgres under linux.

The issue is that I am copying lots of data from an MS SQL Server
database via java/jdbc running on Windows XP over to a postgres database
running on linux. I've setup the postgres database as follows:

LANG=C
initdb  -E UNICODE
createdb -E UNICODE

And then when I'm transferring the data, when my program tries to send a
string containing a character 0xF6 (Latin small letter o with
diaeresis), then I get a JDBC exception & an error log on the server as
follows:
ERROR:  invalid multibyte character for locale
HINT:  The server's LC_CTYPE locale is probably incompatible with the
database encoding.

I have tried setting locale/lc_ctype to C, POSIX, iso_8859_1, all kinds
of things, and nothing seems to fix it.


If I setup the database as follows:
LANG=C
initdb -E iso8859_1
createdb -E iso8859_1

Then it appears to work OK - but I then get an error with character 0xE2
(Latin small letter a with circumflex):
ERROR:  could not convert UTF-8 character 0x00e2 to ISO8859-1

Does anyone know how to do correctly do this?

This is my environment:
LINUX: DEBIAN 3.0, KERNEL 2.4 running on a 2CPU PC.
Postgres: 8.0.1 built from source, no changes to anything, running on
the linux box.
JDBC driver: postgresql-8.0-310.jdbc3.jar
Java JVM (Sun) 1.4.2_02 on Windows XP SP2.


If I run postgres on the Windows XP machine (configured for UNICODE as
above), then I don't have any errors at all. This only happens on the
linux box.

Any help in fixing this would be greatly appreciated.
Thanks,
--Jatinder Sangha
Coalition Development


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

Предыдущее
От: Alexis Vasquez
Дата:
Сообщение: Unsuscribe
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Questions regarding notify processing.