unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.37k stars 176 forks source link

Support (loose) string-to-property-map matching in `icu_properties` #3559

Open skius opened 1 year ago

skius commented 1 year ago

icu_properties does not support obtaining a CodePointMapData (or CodePointSet) from the string of a property name for many properties. It's supported for ECMA-262 binary properties through load_for_ecma_262_unstable, but, e.g., load_word_break cannot be accessed given a string; the client would have to perform property-name-to-icu_properties-functions mapping themselves. Loose matching should also be supported.

UnicodeSet could also support more properties with those features.

sffc commented 1 year ago

Discussion: revisit when we have a clearer picture of the set of properties needed by the transliterator.

Discuss with:

Optional:

Manishearth commented 1 year ago

Yep, when I added the ecma402 function my hope was to potentially add this one as well but we decided to wait for a concrete use case. It does seem like we have one now!

sffc commented 1 year ago

@makotokato added some additional properties needed for Segmenter data in #4175