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 20190929013808.GA21704@alvherre.pgsql
Whole thread Raw
In response to Re: Wrong results using initcap() with non normalized string  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Responses Re: Wrong results using initcap() with non normalized string
List pgsql-hackers
On 2019-Sep-22, Juan José Santamaría Flecha wrote:

> The attached patch addresses the comment about assuming UTF8.

The UTF8 bits looks reasonable to me.  I guess the other part of that
question is whether we support any other multibyte encoding that
supports combining characters.  Maybe for cases other than UTF8 we can
test for 0-width chars (using pg_encoding_dsplen() perhaps?) and drive
the upper/lower decision off that?  (For the UTF8 case, I don't know if
Juanjo's proposal is better than pg_encoding_dsplen.  Both seem to boil
down to a bsearch, though unicode_norm.c's table seems much larger than
wchar.c's).

-- 
Á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: [DOC] Document concurrent index builds waiting on each other
Next
From: Michael Paquier
Date:
Subject: Re: PostgreSQL12 and older versions of OpenSSL