pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Gavan Schneider <list.pg.gavan@pendari.org>
Cc: Vincent Veyron <vv.lists@wanadoo.fr>
Cc: pgsql-general <pgsql-general@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: unexpected character used as group separator by to_char
Date: Wed, 10 Mar 2021 09:58:20 -0300
Message-ID: <20210310125820.GA13231@alvherre.pgsql> (raw)
In-Reply-To: <C15D4E93-9922-401D-9EFB-DDE0610D0498@pendari.org>

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)





view thread (13+ messages)

Message-ID: <20210310125820.GA13231@alvherre.pgsql>
Permalink:  ../20210310125820.GA13231@alvherre.pgsql/
Also on:    postgresql.org/message-id/20210310125820.GA13231@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: alvherre@alvh.no-ip.org, list.pg.gavan@pendari.org, vv.lists@wanadoo.fr, tgl@sss.pgh.pa.us
  Subject: Re: unexpected character used as group separator by to_char
  In-Reply-To: <20210310125820.GA13231@alvherre.pgsql>
  References: <C15D4E93-9922-401D-9EFB-DDE0610D0498@pendari.org> <20210310125820.GA13231@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox