Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XZxBM-0008Nc-Ph for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Oct 2014 07:21:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XZxBM-0006ai-9w for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Oct 2014 07:21:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XZxBL-0006ab-N6 for pgsql-bugs@postgresql.org; Fri, 03 Oct 2014 07:21:39 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XZxBG-0006xO-Su for pgsql-bugs@postgresql.org; Fri, 03 Oct 2014 07:21:38 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 4D7562819E; Fri, 3 Oct 2014 00:21:29 -0700 (PDT) Received: from EX13-CAS-007.vmware.com (EX13-CAS-007.vmware.com [10.113.191.57]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 49CD3B0343; Fri, 3 Oct 2014 00:21:29 -0700 (PDT) Received: from EX13-MBX-024.vmware.com (10.113.191.44) by EX13-MBX-003.vmware.com (10.113.191.23) with Microsoft SMTP Server (TLS) id 15.0.775.38; Fri, 3 Oct 2014 00:21:29 -0700 Received: from [192.168.1.90] (10.113.160.246) by EX13-MBX-024.vmware.com (10.113.191.44) with Microsoft SMTP Server (TLS) id 15.0.775.38; Fri, 3 Oct 2014 00:21:22 -0700 Message-ID: <542E4E64.60208@vmware.com> Date: Fri, 3 Oct 2014 10:21:08 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0 MIME-Version: 1.0 To: Bruce Momjian , CC: Subject: Re: BUG #11550: Error messages contain not encodable characters (Latin9) References: <20141001200923.17171.69683@wrigleys.postgresql.org> <20141003001519.GD20459@momjian.us> In-Reply-To: <20141003001519.GD20459@momjian.us> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.113.160.246] X-ClientProxiedBy: EX13-CAS-013.vmware.com (10.113.191.65) To EX13-MBX-024.vmware.com (10.113.191.44) X-Pg-Spam-Score: -7.2 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 10/03/2014 03:15 AM, Bruce Momjian wrote: > On Wed, Oct 1, 2014 at 08:09:23PM +0000, willmis@gmail.com wrote: >> If we set client_encoding to Latin9 (as we are here in Germany), we get an >> error message from PostgreSQL: >> >> character with byte sequence 0xe2 0x80 0x9e in encoding UTF8 has no >> equivalent in LATIN9 >> >> This behaviour leads to problems in tools we use like Zeos etc. >> >> Is there a way to change the delimiters in messages by some way? > > No. Well, you could manually search & replace the .po files and run msgfmt on them. But no, there's no easy way out. Can we fix this? It's annoying that you can't use LATIN9 with a German locale, as that is the most common encoding used with German, aside from UTF-8. In general, it's annoying that you get errors like that if you use an encoding that can't represent all the characters in error messages. In situations like this, it would be clearly better to transliterate the quotation marks to " or «». Also with umlauts (äöü), it would be better to transliterate them to ae, oe, ue, than to throw an error. Gettext does perform translitteration, but the problem is that we first convert the error message to the server encoding, using gettext, and then convert from server encoding to the client encoding ourselves. It would make more sense to let gettext convert directly to the client encoding. We currently construct all the messages in server encoding and convert to client encoding just before sending to the client, so changing that would require some care to keep track which messages are already in client encoding and which ones need conversion. But if someone is willing to put some effort to it, it seems doable. - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs