From: Vincent Veyron <vv.lists@wanadoo.fr>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-general <pgsql-general@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Subject: Re: unexpected character used as group separator by to_char
Date: Wed, 10 Mar 2021 13:19:28 +0100
Message-ID: <20210310131928.fb29ee77d3dba82f4084e185@wanadoo.fr> (raw)
In-Reply-To: <20210310052457.GA10997@alvherre.pgsql>
References: <20210310000345.2244070de113915b39ae2fca@wanadoo.fr>
<20210310052457.GA10997@alvherre.pgsql>
On Wed, 10 Mar 2021 02:24:57 -0300
Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> That space (0xe280af) is U+202F, which appears to be used for French and
> Mongolian languages (exclusively?)
On Tue, 09 Mar 2021 18:57:05 -0500
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> In any case, you could force the issue with a pattern like '[\s\uNNNN]'
> for whatever the code point of that character is.
On Wed, 10 Mar 2021 09:41:19 +0100
Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> SELECT replace(to_char(2345.10, 'FM999G990D00'), E'\u202F', ' ');
Thank you all for the helpful answers, I can work with that.
Strange that to_char() and to_number() would use a different separator, though :
select to_number(to_char(1234.56, 'FM999G990D00'), 'FM999G990D00');
to_number
-----------
1234.5
select to_number(replace(to_char(1234.56, 'FM999G990D00'),E'\u202F', ' '), 'FM999G990D00');
to_number
-----------
1234.56
--
Bien à vous, Vincent Veyron
https://compta.libremen.com
Logiciel libre de comptabilité générale en partie double
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: vv.lists@wanadoo.fr, alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at
Subject: Re: unexpected character used as group separator by to_char
In-Reply-To: <20210310131928.fb29ee77d3dba82f4084e185@wanadoo.fr>
References: <20210310000345.2244070de113915b39ae2fca@wanadoo.fr> <20210310052457.GA10997@alvherre.pgsql> <20210310131928.fb29ee77d3dba82f4084e185@wanadoo.fr>
* 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