Re: collate not support Unicode Variation Selector - Mailing list pgsql-hackers

From Tom Lane
Subject Re: collate not support Unicode Variation Selector
Date
Msg-id 2810887.1659488215@sss.pgh.pa.us
Whole thread Raw
In response to Re: collate not support Unicode Variation Selector  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: collate not support Unicode Variation Selector
List pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> So you want to match only strings that contain U&'\+003436' *not*
> followed by a variation selector (as we also discussed at [1]).  I'm
> pretty sure that everything in PostgreSQL considers variation
> selectors to be separate characters.

There might be something that doesn't, but LIKE certainly isn't it.
I don't believe plain LIKE is collation-aware at all, it just sees
characters to match or not match.  ILIKE is a little collation-aware,
but it's still not going to consider a combining sequence as one
character.  The same for the regex operators.

Maybe it would help if you run the strings through normalize() first?
I'm not sure if that can combine combining characters.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: collate not support Unicode Variation Selector
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Slow standby snapshot