Re: Wrong results using initcap() with non normalized string - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Wrong results using initcap() with non normalized string
Date
Msg-id 20190921004251.GA18370@alvherre.pgsql
Whole thread Raw
In response to Re: Wrong results using initcap() with non normalized string  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2019-Sep-20, Tom Lane wrote:

> =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= <juanjo.santamaria@gmail.com> writes:
> > I have come around a strange situation when using a unicode string
> > that has non normalized characters. The attached script 'initcap.sql'
> > can reproduce the problem.

For illustration purposes:

SELECT initcap('ŞUB');
 initcap 
─────────
 Şub
(1 fila)

SELECT initcap('ŞUB');
 initcap 
─────────
 ŞUb
(1 fila)

> If we're going to start worrying about non-normalized characters,
> I suspect there are far more places than this one that we'd have
> to consider buggy :-(.

I would think that we have to start somewhere, rather than take the
position that we can never do anything about it.

(ref: https://www.postgresql.org/message-id/flat/53E179E1.3060404%402ndquadrant.com )

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Optimization of some jsonb functions
Next
From: Michael Paquier
Date:
Subject: Re: subscriptionCheck failures on nightjar