Re: Pre-proposal: unicode normalized text - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Pre-proposal: unicode normalized text
Date
Msg-id a41cfc7c3fcd00ed5d1008cc6fa810340f35fd47.camel@j-davis.com
Whole thread Raw
In response to Re: Pre-proposal: unicode normalized text  (Nico Williams <nico@cryptonector.com>)
Responses Re: Pre-proposal: unicode normalized text  (Nico Williams <nico@cryptonector.com>)
List pgsql-hackers
On Tue, 2023-10-03 at 15:15 -0500, Nico Williams wrote:
> Ugh, My client is not displying 'a' correctly

Ugh. Is that an argument in favor of normalization or against?

I've also noticed that some fonts render the same character a bit
differently depending on the constituent code points. For instance, if
the accent is its own code point, it seems to be more prominent than if
a single code point represents both the base character and the accent.
That seems to be a violation, but I can understand why that might be
useful.

>
> Almost every Latin input mode out there produces precomposed
> characters
> and so they effectively produce NFC.

The problem is not the normal case, the problem will be things like
obscure input methods, some kind of software that's being too clever,
or some kind of malicious user trying to confuse the database.

>
> That means that indices
> need to normalize strings, but tables need to store unnormalized
> strings.

That's an interesting idea. Would the equality operator normalize
first, or are you saying that the index would need to recheck the
results?

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Pavel Borisov
Date:
Subject: Re: Index range search optimization
Next
From: Jeff Davis
Date:
Subject: Re: Pre-proposal: unicode normalized text