Re: [INTERFACES] JDBC and character sets

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: [INTERFACES] JDBC and character sets
Дата
Msg-id 199906230131.KAA01670@ext16.sra.co.jp
обсуждение исходный текст
Ответ на RE: [INTERFACES] JDBC and character sets  (Peter Mount <petermount@it.maidstone.gov.uk>)
Список pgsql-interfaces
> That's my main worry, and one of the reasons I haven't really looked at
> it yet.
> 
> What we would need is some way for the client to see if the backend was
> compiled for unicode, and enable that functionality if it is, or default
> to ASCII if not.

You could issue "select getdatabaseencoding()" to judge for that.

1) if that fails, the backend is not compiled with MB support.

2) if it returns other than "UNICODE", the backend is compiled with MB
but the encoding for the database is not Unicode.  (Note that in MB,
the encoding for a database can be decided at its creation time. So it
may not always be UNICODE even if you comiled with --with-mb=UNICODE).
Possible encoding returned by the function would be:
SQL_ASCII        ASCIIEUC_JP            Japanese EUCEUC_CN            Chinese EUCEUC_KR            Korean EUCEUC_TW
      Taiwan EUCUNICODE            Unicode(UTF-8)MULE_INTERNAL        Mule internalLATIN1            ISO 8859-1 English
andsome European languagesLATIN2            ISO 8859-2 English and some European languagesLATIN3            ISO 8859-3
Englishand some European languagesLATIN4            ISO 8859-4 English and some European languagesLATIN5            ISO
8859-5English and some European languagesKOI8            KOI8-RWIN            CP1251ALT            CP866
 

See doc/README.mb for more details.
---
Tatsuo Ishii


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

Предыдущее
От: Daren Sefcik
Дата:
Сообщение: Solaris + ColdFusion + PostgreSQL + ODBC
Следующее
От: Christian Borowski
Дата:
Сообщение: