Re: What encoding to use for English, French, Spanish

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, novnov <novnovice(at)gmail(dot)com>
Subject: Re: What encoding to use for English, French, Spanish
Date: 2007-10-17 14:52:14
Message-ID: 20071017145214.GG5737@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Eisentraut escribió:
> novnov wrote:
> > My project is currently SQL_ASCII encoded. I will need to accomodate
> > both French and Spanish in addition to English. I don't anticipate
> > needing Far East languages. Reading here on the forums I come up with
> > Latin9 as perhaps adequate. But others recommend unicode for
> > relatively simple needs like my own.
>
> LATIN9 or UTF-8 are the appropriate choices for your project. The
> choice between these is mostly a matter of taste, unless there are
> additional requirements in the project.

I used to think that there was no practical difference between using
LATIN9 or UTF8, but experience (not my own, but those from people in the
pgsql-es-ayuda list) has told me otherwise. When people start mixing
environments, it is quite common that they get the client_encoding wrong
in some cases. In those cases, having an encoding able to tell a valid
string from an invalid one is really helpful -- thus using UTF8 as the
server encoding is the way to go.

Latin9 is _capable_ of storing your data, yes, but if you fail to set
client_encoding then it is also capable of storing something you don't
really want to store. I'd stay away from it.

--
Alvaro Herrera http://www.amazon.com/gp/registry/DXLWNGRJD34J
"Los románticos son seres que mueren de deseos de vida"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Browne 2007-10-17 15:11:34 Re: DROP VIEW lasts forever
Previous Message Jason L. Buberel 2007-10-17 14:37:15 Prepared statement parameters for an 'IN ()' clause