pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrzej Angowski <andrzej.angowski@gmail.com>
To: pgsql-admin@postgresql.org
Subject: LATIN2 encoding and Polish_Poland locale
Date: Sun, 28 Feb 2010 22:44:49 +0100
Message-ID: <edcfeeaa1002281344r4dcb7929ne49af06908a291a2@mail.gmail.com> (raw)

All,

I am running PostgreSQL database on Windows XP with SP3 machine.
Recently I have tried to upgrade from 8.2.15 to 8.4.2 but I encounter
the following issue: one of my databases is LATIN2 encoded
(ISO-8859-2). It works fine on 8.2.15 (LATIN2 encoding and
Polish_Poland locale - I have Polish characters and sorting works
fine), but on 8.4.2 default encoding for Polish_Poland is UTF-8. When
I try to set up LATIN2 encoding with Polish_Poland locale I get the
following error:

>createdb -E LATIN2 -l Polish_Poland test
createdb: database creation failed: ERROR:  encoding LATIN2 does not
match locale Polish_Poland
DETAIL:  The chosen LC_CTYPE setting requires encoding WIN1250.

In 8.4 manual -> Section 22.2 Character Set Support one can read:
An important restriction, however, is that each database's character
set must be compatible with the database's LC_CTYPE and LC_COLLATE
locale settings. For C or POSIX locale, any character set is allowed,
but for other locales there is only one character set that will work
correctly. (On Windows, however, UTF-8 encoding can be used with any
locale.)

So I manage to establish a DB with LATIN2 encoding with C locale:
>createdb -E LATIN2 -l C -T template0 test

I have Polish characters but sorting is not correct.

How can I set up Polish_Poland locale with LATIN2 encoding in PostgreSQL 8.4.2?


Thanks,
-- 
Andrzej Angowski



view thread (3+ messages)  latest in thread

Message-ID: <edcfeeaa1002281344r4dcb7929ne49af06908a291a2@mail.gmail.com>
Permalink:  ../edcfeeaa1002281344r4dcb7929ne49af06908a291a2@mail.gmail.com/
Also on:    postgresql.org/message-id/edcfeeaa1002281344r4dcb7929ne49af06908a291a2@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: andrzej.angowski@gmail.com
  Subject: Re: LATIN2 encoding and Polish_Poland locale
  In-Reply-To: <edcfeeaa1002281344r4dcb7929ne49af06908a291a2@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox