Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A723263264C for ; Sun, 28 Feb 2010 17:45:01 -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 94835-08 for ; Sun, 28 Feb 2010 21:44:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mail.postgresql.org (Postfix) with ESMTP id E6C7C6325C0 for ; Sun, 28 Feb 2010 17:44:50 -0400 (AST) Received: by bwz8 with SMTP id 8so1266734bwz.3 for ; Sun, 28 Feb 2010 13:44:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=o5BXvQQFcSlP+winWyGj8fb0aji3vjpl8xiVhwy3QAQ=; b=tTKGie0z1YmvSff3OFtREiUNIh30sLo2JGZE7rLHAxn9lEstZQRTUT6hej56tFCSXV nvLJLWvxGh4JC9zNbQtO57ot5DzClW6Ve276o9yXmgzNcNIoNAG79QLmXN4PvWwwe3zW E3vSJYTDSk9lyLPgndFbcXzRpgi0rAStxkMzI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=VqmNS6A3jv157yWxnBOZJeh1r6N58lGAZSRFN+XE2DZfBKacY+DmeobJXwIbJPeney mv7LqkzHGQsdsOyX88Nr/YpLF52Xt0giaqdLqrowSw1eJ7bfFbgwvzmMl30nGsxIZKF+ 7rnPq7fgLEnITTCGQH7eaoyRfdgzUJ6UJB2AY= MIME-Version: 1.0 Received: by 10.204.129.82 with SMTP id n18mr2391509bks.132.1267393489165; Sun, 28 Feb 2010 13:44:49 -0800 (PST) Date: Sun, 28 Feb 2010 22:44:49 +0100 Message-ID: Subject: LATIN2 encoding and Polish_Poland locale From: Andrzej Angowski To: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 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: 201002/196 X-Sequence-Number: 33799 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