Re: spanish characters in postgresql

From: Jean-Michel POURE <jm(dot)poure(at)freesurf(dot)fr>
To: Joel Rodrigues <joelrodrigues(at)mac(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: spanish characters in postgresql
Date: 2002-03-14 08:01:24
Message-ID: 200203140801.g2E81OVc010209@www1.translationforge
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Le Mercredi 13 Mars 2002 19:53, Joel Rodrigues a écrit :
> I'm new to databases & PostgreSQL, but wouldn't it be better to
> use Unicode ?And, instead of initdb, cannot one simply override the default
> database cluster encoding using :
> "CREATE DATABASE mydbname WITH ENCODING = 'unicode'" ?

Yes, it is always possible. Some remarks :
1) PostgreSQL odbc driver is UTF-8 compatible but not UCS-2 compatible (UCS-2
is needed by some Microsoft products, such as Access 2K). Next version of
odbc drivers will support UCS-2.
2) Some Microsoft products, such as VB, do not support Unicode at all.
3) Php can parse UTF-8 pages. But to use sub-string functions (left, right,
mid), Php needs to be compiled with multi-byte options.

> Also, could anyone tell me why PostgreSQL sometimes echoes it's
> own responses, i.e. stating things twice, like so :
> postgres=# SHOW CLIENT_ENCODING;
> NOTICE:  Current client encoding is 'SQL_ASCII'
> NOTICE:  Current client encoding is 'SQL_ASCII'
> SHOW VARIABLE
> postgres=#

You can set SET CLIENT_ENCODING to 'Latin9' or 'Latin1' to recode data
between backend and client. Please note PostgreSQL is only able to recode
data from Unicode <-> Latin as for PostgreSQL 7.2+.

Choose Unicode to display multiple scripts at the same time = Japanese
glyphs, Arabic, etc.. and recode when needed.

On the converse, it is recommended to choose a single encoding on both sides.

Cheers,
Jean-Michel POURE

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Michel POURE 2002-03-14 08:04:23 Re: Queries from different databases
Previous Message joerg.naumann 2002-03-14 07:19:33 select sum() possible or not ?