pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tatsuo Ishii <t-ishii@sra.co.jp>
To: Peter Mount <petermount@it.maidstone.gov.uk>
Cc: 'Herouth Maoz' <herouth@oumail.openu.ac.il>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] JDBC and character sets
Date: Wed, 23 Jun 1999 10:31:17 +0900
Message-ID: <199906230131.KAA01670@ext16.sra.co.jp> (raw)
In-Reply-To: <1B3D5E532D18D311861A00600865478C9FCB@exchange1.nt.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.

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		ASCII
	EUC_JP			Japanese EUC
	EUC_CN			Chinese EUC
	EUC_KR			Korean EUC
	EUC_TW			Taiwan EUC
	UNICODE			Unicode(UTF-8)
	MULE_INTERNAL		Mule internal
	LATIN1			ISO 8859-1 English and some European languages
	LATIN2			ISO 8859-2 English and some European languages
	LATIN3			ISO 8859-3 English and some European languages
	LATIN4			ISO 8859-4 English and some European languages
	LATIN5			ISO 8859-5 English and some European languages
	KOI8			KOI8-R
	WIN			CP1251
	ALT			CP866

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



view thread (14+ messages)  latest in thread

Message-ID: <199906230131.KAA01670@ext16.sra.co.jp>
Permalink:  ../199906230131.KAA01670@ext16.sra.co.jp/
Also on:    postgresql.org/message-id/199906230131.KAA01670@ext16.sra.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: t-ishii@sra.co.jp, petermount@it.maidstone.gov.uk, herouth@oumail.openu.ac.il
  Subject: Re: [INTERFACES] JDBC and character sets
  In-Reply-To: <199906230131.KAA01670@ext16.sra.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox