Re: BUG #19341: REPLACE() fails to match final character when using nondeterministic ICU collation - Mailing list pgsql-bugs

From Laurenz Albe
Subject Re: BUG #19341: REPLACE() fails to match final character when using nondeterministic ICU collation
Date
Msg-id 9e6f15bbd30f8d64027ee32551bdcaed9506fc9f.camel@cybertec.at
Whole thread Raw
In response to Re: BUG #19341: REPLACE() fails to match final character when using nondeterministic ICU collation  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-bugs
On Tue, 2025-12-02 at 19:29 +0200, Heikki Linnakangas wrote:
> I added a simple test for this, and I think this is still not quite
> right. I added the following to collate.icu.utf test:
>
> +-- Test for match at the end of the string.  (We had a bug on that
> +-- once)
> +SELECT a, b, replace(b COLLATE ignore_accents, 'te', 'ma') FROM test4nfd;
> + a |  b   | replace
> +---+------+---------
> + 1 | cote | coma
> + 2 | côte | coma
> + 3 | coté | coma
> + 4 | côté | coma
> +(4 rows)
> +
>
> In the added test query, the accents on the 'o' are stripped, which
> doesn't look correct.

I am not sure if that is OK or not (after all, it's an accent
insensitive collation, so "coma" and "côma" should be the same).

But it seems unrelated to the bug report at hand.

Yours,
Laurenz Albe



pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #19341: REPLACE() fails to match final character when using nondeterministic ICU collation
Next
From: Laurenz Albe
Date:
Subject: Re: BUG #19341: REPLACE() fails to match final character when using nondeterministic ICU collation