Hi, Internals
I changed below the RFC.
- https://wiki.php.net/rfc/grapheme_add_locale_for_case_insensitive
Pull request is below: - https://github.com/php/php-src/pull/18792
Change point is below:
- Add a strength for grapheme_* functions
- Affect to all over the world characters, ex: Ideographic Variation
Sequence(IVS) - Use Collator object const values.
- Affect to all over the world characters, ex: Ideographic Variation
$locale parameter is not change anything. Because I could not find any way.
Maybe I overlooked something, So please point it out to me.
Regards
Yuya
--
Yuya Hamada (tekimen)
Hi, Internals
I changed below the RFC.
- https://wiki.php.net/rfc/grapheme_add_locale_for_case_insensitive
Pull request is below:- https://github.com/php/php-src/pull/18792
Change point is below:
- Add a strength for grapheme_* functions
- Affect to all over the world characters, ex: Ideographic Variation
Sequence(IVS)- Use Collator object const values.
These settings are indeed important for these functions, but I can't get
around the fact that it makes these APIs really cluttered and
complicated — something that many functions in the grapheme_ / intl
extension already suffer from.
Is this API really the best way?
$locale parameter is not change anything. Because I could not find any way.
It seems that I came to a similar conclusion, but locales are much more
complicated than just languageCode_regionCode (for example, see
https://github.com/derickr/php-text/blob/main/tests/text-contains.phpt#L25)
You also don't really need a strength argument, as you can 'encode' that
in the locale name, like: 'nb_NO-u-ks-primary' (I know, it's rather ugly
and the list of options is vast:
https://www.unicode.org/reports/tr35/tr35-collation.html#Common_Settings
cheers,
Derick