Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 173E51337B93 for ; Tue, 8 Mar 2011 11:24:39 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 53809-01 for ; Tue, 8 Mar 2011 15:24:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wikingerlegenden.de (static.154.214.46.78.clients.your-server.de [78.46.214.154]) by mail.postgresql.org (Postfix) with ESMTP id 6A53A133740B for ; Tue, 8 Mar 2011 11:24:31 -0400 (AST) Received: from [192.168.23.242] (static.154.214.46.78.clients.your-server.de [78.46.214.154]) (authenticated bits=0) by wikingerlegenden.de (8.14.2/8.14.2) with ESMTP id p28FOO7X044144; Tue, 8 Mar 2011 16:24:31 +0100 (CET) (envelope-from foo@meisterderspiele.de) Message-ID: <4D764A27.3070707@meisterderspiele.de> Date: Tue, 08 Mar 2011 16:24:23 +0100 From: =?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: Missing Bug-Report #5904? References: <4D70ADE8.2030500@meisterderspiele.de> <7657.1299518443@sss.pgh.pa.us> <4D762A68.2070907@meisterderspiele.de> <8846.1299596530@sss.pgh.pa.us> In-Reply-To: <8846.1299596530@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201103/151 X-Sequence-Number: 29661 Hello, >>>> # SET lc_time = "de_DE.UTF-8"; >>>> # SELECT to_char('2011-03-04 00:00:01'::date, 'TMMonth YYYY'); >>>> to_char >>>> ----------- >>>> MäRz 2011 > >>> I can reproduce the above when the database encoding is not UTF8 or >>> lc_ctype isn't a UTF8 locale. > >> Hm... encoding of the database is UTF8. The lc_ctype is 'C'. > > Right, that was the same case I checked. In C locale, ä is not a > letter, so you get the above from the initcap transformation. > >> But don't that mean, that the translation of the timestamp to languages >> with other umlauts should also be wrong. For example to "fr_FR.UTF-8"? > > Possibly, I haven't checked. If they have any month names with > non-ASCII characters in the middle, they'd see the same thing. > You would certainly also get undesirable results from TMMONTH, since > it wouldn't know how to uppercase ä. In my view none of this is > a Postgres bug --- the correct fix is to use locale settings that > correspond to the behavior you want. Hm... in my point of view it's a bug, but not necessarily a PG bug. My desired result is the correct translated output in different languages. Now i know that this is not possible, because i have to use the correct lc_ctype for the entire database, which can't be changed after the database-creation. The only work-around seems to be to handle the translation myself. That's very ugly and makes the use of TMMonth pointless, if you have to take care of the result-output before you use the database. Thanks to all for your time and help, Torsten