Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJyQ2-0005uK-Aq for pgsql-general@arkaria.postgresql.org; Wed, 10 Mar 2021 12:58:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lJyQ0-0002b6-9o for pgsql-general@arkaria.postgresql.org; Wed, 10 Mar 2021 12:58:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJyQ0-0002ay-1l for pgsql-general@lists.postgresql.org; Wed, 10 Mar 2021 12:58:28 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJyPx-0002xG-S8 for pgsql-general@postgresql.org; Wed, 10 Mar 2021 12:58:27 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 6ACF35C0159; Wed, 10 Mar 2021 07:58:24 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 10 Mar 2021 07:58:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=D8toJXBoGfbZEy+x4rErVZtLswHUN3yAi3uxA+SZyCE=; b=gigizasr /hjro7PvpcJ2r+NAq8Hnhsdg87SHuqtR3aojxtwIMjD37LqfvYVL83NRDNPr1W4h IDhN8Ai3GDOhiighhCBaW2WCvlUql8MJkeh1WZSpH6YdQRPyBVvTP1LG90S+ap9J jfromCgf4wM1PRckNyV9rUpcjnFLKliTRPNYRUB6NrOoD6V+zAfaTorPHBp0oXyv 5zSR+6rW8eoKlpC+GIAC9gZSx0ggNcgS5DrOJmL9w4bu5TsyArdW5/LNS+8Z1gqL 3x/IVnFqX8A2VdRGkc9DM5DHuclD0B9HB9GlH24659nNmC+SySYg08CfXF42L2Eo Bat+M/InbEPm5g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddukedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugfgjggfsehtke ertddtreejnecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhr vgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpeefledtfeetgf ffkeeghedtgfeigffghefhheefledtgfegteejfffgkeetfefgvdenucffohhmrghinhep tghouggvphhoihhnthhsrdhnvghtpdhunhhitghouggvrdhorhhgnecukfhppeduledtrd elhedrudelrdelheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id B03031080059; Wed, 10 Mar 2021 07:58:23 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id E64442A0914; Wed, 10 Mar 2021 09:58:20 -0300 (-03) Date: Wed, 10 Mar 2021 09:58:20 -0300 From: Alvaro Herrera To: Gavan Schneider Cc: Vincent Veyron , pgsql-general , Tom Lane Subject: Re: unexpected character used as group separator by to_char Message-ID: <20210310125820.GA13231@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Mar-10, Gavan Schneider wrote: > On 10 Mar 2021, at 16:24, Alvaro Herrera wrote: > > > That space (0xe280af) is U+202F, which appears to be used for French and > > Mongolian languages (exclusively?). It is quite possible that in the > > future some other language will end up using some different whitespace > > character, possibly breaking any code you write today -- the use of > > U+202F appears to be quite recent. > > > Drifting off topic a little. That a proper code point for things that will > benefit from the whitespace but should still stay together. > Also it’s not that new, added in 1999 — https://codepoints.net/U+202F I probably got misled on this whole thing by these change proposals. https://www.unicode.org/L2/L2019/19116-clarify-nnbsp.pdf https://www.unicode.org/L2/L2020/20008-core-text.pdf Apparently prior to this, they (?) had been using/recommending THIN SPACE U+2009 as separator, which is not non-breaking. Anyway, it reinforces my point that it's not impossible that some other locale definition could use U+2009 when printing numbers, or even some other kind of spacing entity in non-Latin languages etc. So I think that for truly robust handling you should separate the thing you use for display from the thing you use to talk to the database. > And the thin space is part of the international standard for breaking up > large numbers (from 1948), specifically no dots or commas should be used in > this role. The dot or comma is only to be used for the decimal point! Interesting U+2014 EM DASH I didn't know this. -- Álvaro Herrera Valdivia, Chile "This is a foot just waiting to be shot" (Andrew Dunstan)