Re: Default PostgreSQL server encoding - Change to unicode (utf8)

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Léa Massiot <lmhelp1(at)orange(dot)fr>
Subject: Re: Default PostgreSQL server encoding - Change to unicode (utf8)
Date: 2012-02-27 15:54:32
Message-ID: 201202270754.32615.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday, February 27, 2012 3:55:43 am Léa Massiot wrote:
> Hello.
> Thank you for your answer.

> Thank you for the two links.
> I read this (in the second one): "On Windows, however, UTF-8 encoding can
> be used with any locale." yet I still have some questions...
>

> Question 1
> Focusing on the "Collation" and "Ctype" columns,
> has "English_United States.1252" something to do with "Windows-1252"
> ("CP-1252")?
> "CP-1252" is an 8 bits character encoding (so, it can map codes to 2^8
> characters at most).
> How compatible is this with an "UTF8" "Encoding"?
> For people testing PostgreSQL under Windows, is there any other more
> appropriate "Collation" that could be used to set a database collation?

This is answered in the first link I sent:

http://www.postgresql.org/docs/9.0/interactive/locale.html

" Windows uses more verbose locale names, such as German_Germany or Swedish_Sweden.1252,
but the principles are the same."

"
LC_COLLATE String sort order
LC_CTYPE Character classification (What is a letter? Its upper-case equivalent?
"

So appropriate depends on what sorting character rules you want to follow. By the way
both of these are fixed at database creation and cannot be changed.

> There is no "locale -a" command avaiblable under Windows. Is there any
> workaround?

A little Googling found this. I am not a regular Windows user, so there may be
better options out there:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/systeminfo.mspx?mfr=true

>
> Thanks and best regards.
> --
> Léa
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2012-02-27 16:02:06 Re: Four issues why "old elephants" lack performance: Explanation sought Four issues why "old elephants" lack performance: Explanation sought
Previous Message Adrian Klaver 2012-02-27 15:29:11 Re: PSQL 9.1 Streaming Replication Windows 2008 64 bit Servers