Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6EF21632245 for ; Mon, 1 Mar 2010 14:09:28 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 95832-04 for ; Mon, 1 Mar 2010 18:09:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f225.google.com (mail-bw0-f225.google.com [209.85.218.225]) by mail.postgresql.org (Postfix) with ESMTP id A708B633CC5 for ; Mon, 1 Mar 2010 14:09:17 -0400 (AST) Received: by bwz25 with SMTP id 25so785859bwz.35 for ; Mon, 01 Mar 2010 10:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=PdvZj5nSFtRzW0Psdqp/bOustfMLYFLpUtcVePlFKqo=; b=gr1mnDzflAjc6sSMMrhKRQ52GpbszDISTwtr8vdfaqjerodsF+VL03BWW2M0IERW3B ppcijNDvoFIAy50qfKQdjgCND0EC+uC8+5Nm/6W6EzA1HSolu8g5vR3V5jLNmF7HSNJw cvGFm+VJ8iIkQe/PNLJQVD2ENi+5mEUrtJ2IY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=H9m8b6yMa2cy4UKAPVU9y/3gdZBvoNZCY9X4VsEuembuTZKvRnOvdi0V84KbpQSbRp oe7CuouRrlMMPPrn6QV+eqrUgOsX1QvJER9KrpjXRZBAKZeXDI17s7AW5XQqW0lxreiK 5VnADeMpC8UfDht2aRmOhWUvA/9vdXXnBuFzE= MIME-Version: 1.0 Received: by 10.204.4.139 with SMTP id 11mr3335403bkr.27.1267466955796; Mon, 01 Mar 2010 10:09:15 -0800 (PST) In-Reply-To: <20100301134921.175810@gmx.net> References: <20100301134921.175810@gmx.net> Date: Mon, 1 Mar 2010 19:09:15 +0100 Message-ID: Subject: Re: LATIN2 encoding and Polish_Poland locale From: Andrzej Angowski To: Jan-Peter Seifert , pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/4 X-Sequence-Number: 33803 Peter, The following actually works: >createdb -E LATIN2 -l Polish_Poland.28592 test Thanks a lot! 2010/3/1 Jan-Peter Seifert : > Hello Andrzej, > > try this: > > Identify the code page Windows is using for LATIN2 with the PostgreSQL to= ol pg_controldata (8.2 server's version). Look for the number following the= dot in LC_COLLATE / LC_TYPE. For LATIN1 it's 28591. > > Try creating the database for 8.4 with the PostgreSQL tool createdb (v8.4= .x) (example for LATIN1 and German locale, locale =3D LC_COLLATE / LC_TYPE = in 8.2): > > createdb -U postgres -h -p --owner=3Dname_of_owner --locale= =3DGerman_Germany.28591 --encoding=3DLATIN1 --template=3Dtemplate0 database= _name > > Good luck, > > Peter > > -------- Original-Nachricht -------- >> Datum: Sun, 28 Feb 2010 22:44:49 +0100 >> Von: Andrzej Angowski >> An: pgsql-admin@postgresql.org >> Betreff: [ADMIN] LATIN2 encoding and Polish_Poland locale > >> 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: =A0encoding LATIN2 does not >> match locale Polish_Poland >> DETAIL: =A0The 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 >> >> -- >> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-admin > > -- > Sicherer, schneller und einfacher. Die aktuellen Internet-Browser - > jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser > --=20 Andrzej Angowski e-mail : Andrzej.Angowski@gmail.com