RE: [INTERFACES] JDBC and character sets

Поиск
Список
Период
Сортировка
Искать

RE: [INTERFACES] JDBC and character sets

От:
Peter Mount <petermount@it.maidstone.gov.uk>
Дата:
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.

Peter

-- 
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.


-----Original Message-----
From: Herouth Maoz [mailto:herouth@oumail.openu.ac.il]
Sent: Tuesday, June 22, 1999 4:45 PM
To: Peter Mount
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] JDBC and character sets


At 18:22 +0300 on 22/06/1999, David Warnock wrote:


> > If I understand this correctly, if I make sure the driver converts
the
> > strings (in the correct methods) into UTF-8, then unicode support
will
> > work?
> >
> > I'm wondering, as I haven't delved into Unicode with the driver yet.
If
> > this is the case, it will be a simple thing to implement.
>
> Ooooh yes please. This would be a great thing for us. If you need any
> help testing please tell us.

Well, what if we haven't compiled the system for unicode? Make sure the
driver doesn't kill us in such a case. We use ISO8859-8 for our data. If
you were to convert it to utf-8, it would certainly not work as we
expect.
Especially if the database is not compiled for unicode.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma


Re: [INTERFACES] JDBC and character sets

От:
David Warnock <david@sundayta.co.uk>
Дата:
Peter,

Obviously I agree 100% that supporting unicode should not break existing
applications or code.

How about either a extra parameter to the creation of a connection?

If it is easier to keep this very separate I don't mind a completely
separate jar file/driver at least to start with. After all most people
won't yet be using this feature so why bloat their driver?

Dave
-- 
David Warnock
Sundayta Ltd

Re: [INTERFACES] JDBC and character sets

От:
Tatsuo Ishii <t-ishii@sra.co.jp>
Дата:
> 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 and some European languagesLATIN2			ISO 8859-2 English and some European languagesLATIN3			ISO 8859-3 English and some European languagesLATIN4			ISO 8859-4 English and some European languagesLATIN5			ISO 8859-5 English and some European languagesKOI8			KOI8-RWIN			CP1251ALT			CP866

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

FAQ