From: | 荒井元成 <n2029(at)ndensan(dot)co(dot)jp> |
---|---|
To: | "'Daniel Verite'" <daniel(at)manitou-mail(dot)org>, "'Thomas Munro'" <thomas(dot)munro(at)gmail(dot)com> |
Cc: | "'Peter Eisentraut'" <peter(dot)eisentraut(at)enterprisedb(dot)com>, "'PostgreSQL Hackers'" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | RE: Unicode Variation Selector and Combining character |
Date: | 2022-06-01 10:35:36 |
Message-ID: | 013e01d875a3$54bed060$fe3c7120$@ndensan.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thank you for your reply.
I will check if there is any function below char_length that is realized by icu_ext.
substring|trim|btrim|left
|lpad|ltrim|regexp_match|regexp_matches
|regexp_replace|regexp_split_to_array|regexp_split_to_table
|replace|reverse|right|rpad|rtrim|split_part|strpos|substr|starts_with
Best regards,
-----Original Message-----
From: Daniel Verite <daniel(at)manitou-mail(dot)org>
Sent: Wednesday, June 1, 2022 6:46 PM
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: 荒井元成 <n2029(at)ndensan(dot)co(dot)jp>; Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>; PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Unicode Variation Selector and Combining character
Thomas Munro wrote:
> Looking around a bit, it might be interesting to check if the
> icu_character_boundaries() function in Daniel Vérité's icu_ext treats
> IVSs as single grapheme clusters.
It does.
with strings(s) as (
values (U&'\+0066FE' || U&'\+0E0103'),
(U&'\+00304B' || U&'\+00309A')
)
select s,
octet_length(s),
char_length(s),
(select count(*) from icu_character_boundaries(s,'en')) as graphemes from strings;
s | octet_length | char_length | graphemes
-----+--------------+-------------+-----------
曾󠄃 | 7 | 2 | 1
か゚ | 6 | 2 | 1
Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2022-06-01 10:56:55 | Re: support for MERGE |
Previous Message | Peter Eisentraut | 2022-06-01 10:25:49 | Re: Unicode Variation Selector and Combining character |