UTF-8 encoding - Mailing list pgsql-general

From James B. Byrne
Subject UTF-8 encoding
Date
Msg-id 42495.216.185.71.30.1187271253.squirrel@webmail.harte-lyne.ca
Whole thread Raw
In response to Re: pg_dump on local Windows, pg_restore on Linux?  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
List 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@Harte-Lyne.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


pgsql-general by date:

Previous
From: bhyuan
Date:
Subject: Re: UTF-8 encoding problem
Next
From: Andrei Kovalevski
Date:
Subject: Re: Fastest way to import only ONE column into a table? (COPY doesn't work)