Re: unexpected character used as group separator by to_char

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: unexpected character used as group separator by to_char
Date: 2021-03-10 05:24:57
Message-ID: 20210310052457.GA10997@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2021-Mar-10, Vincent Veyron wrote:

> On Tue, 09 Mar 2021 16:22:07 -0500
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> > (I suppose you could also use regexp_replace to convert random forms
> > of whitespace to plain ASCII space.)
>
> No dice. 'G' formatting looks like a whitespace, but is different (it
> appears to be slightly narrower when displayed in html, too) :

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.

Maybe it'd be better to have the query return two fields: one destined
for printing, the other you can use to feed the database back.

--
Álvaro Herrera Valdivia, Chile
"Porque Kim no hacía nada, pero, eso sí,
con extraordinario éxito" ("Kim", Kipling)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Baldwin 2021-03-10 06:23:40 Re: Using a 'loopback' FDW
Previous Message Steve Baldwin 2021-03-10 04:04:00 Re: Using a 'loopback' FDW