Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 1E29A1337BD8 for ; Tue, 8 Mar 2011 11:02:20 -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 06950-01 for ; Tue, 8 Mar 2011 15:02:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 6CC971337BCE for ; Tue, 8 Mar 2011 11:02:12 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p28F2AXk008847; Tue, 8 Mar 2011 10:02:10 -0500 (EST) To: =?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= cc: pgsql-bugs@postgresql.org Subject: Re: Missing Bug-Report #5904? In-reply-to: <4D762A68.2070907@meisterderspiele.de> References: <4D70ADE8.2030500@meisterderspiele.de> <7657.1299518443@sss.pgh.pa.us> <4D762A68.2070907@meisterderspiele.de> Comments: In-reply-to =?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= message dated "Tue, 08 Mar 2011 14:08:56 +0100" Date: Tue, 08 Mar 2011 10:02:10 -0500 Message-ID: <8846.1299596530@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/150 X-Sequence-Number: 29660 =?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= writes: >>> # 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. regards, tom lane