UTF-8 encoding

From: "James B(dot) Byrne" <byrnejb(at)harte-lyne(dot)ca>
To: "Phoenix Kiula" <phoenix(dot)kiula(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: UTF-8 encoding
Date: 2007-08-16 13:34:13
Message-ID: 42495.216.185.71.30.1187271253.squirrel@webmail.harte-lyne.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Wed, August 15, 2007 21:15, Phoenix Kiula wrote:
>
> Thanks. Here's my locale information:
>
>> locale
> LANG=en_US.UTF-8
> LC_CTYPE="en_US.UTF-8"
> LC_NUMERIC="en_US.UTF-8"
> LC_TIME="en_US.UTF-8"
> LC_COLLATE="en_US.UTF-8"
> LC_MONETARY="en_US.UTF-8"
> LC_MESSAGES="en_US.UTF-8"
> LC_PAPER="en_US.UTF-8"
> LC_NAME="en_US.UTF-8"
> LC_ADDRESS="en_US.UTF-8"
> LC_TELEPHONE="en_US.UTF-8"
> LC_MEASUREMENT="en_US.UTF-8"
> LC_IDENTIFICATION="en_US.UTF-8"
> LC_ALL=
>
>
> Is this enough to run a pgsql database that is supposed to house utf-8
> content?

Yes, those settings are entirely appropriate for CentOS where the system
language is U.S. English. You do not need to override them by setting
LC_ALL and would gain nothing thereby.

The locale preface settings (en_US) determine how internationalized
programs display information to users, whether by text presentation format
masks or via character collation orders. The important thing for
PostgreSQL is that any application host system that generates data stored
by a UTF-8 database instance have its character encoding be UTF-8 or
provide a means to convert it before submitting it to the DBMS. Otherwise
you will get encoding errors when attempting to write data that otherwise
appears to the user as perfectly sensible text.

Sincerely,

--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB(at)Harte-Lyne(dot)ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrei Kovalevski 2007-08-16 13:39:41 Re: Fastest way to import only ONE column into a table? (COPY doesn't work)
Previous Message bhyuan 2007-08-16 13:21:57 Re: UTF-8 encoding problem