icu4x icon indicating copy to clipboard operation
icu4x copied to clipboard

FFI for locale variants

Open linusg opened this issue 5 months ago • 1 comments
trafficstars

There are getters and setters for language/script/region but it appears there is currently no way to access the locale variants from FFI: https://github.com/unicode-org/icu4x/blob/ed457c605c06a07101b20c68d0b1ca20656ee5b5/components/locale_core/src/langid.rs#L88

I need this to implement https://github.com/tc39/ecma402/pull/960.

linusg avatar Jun 14 '25 14:06 linusg

Note: this API is currently ignored by our FFI coverage test with the following comment: "Not planned for 2.0: Until someone needs them"

https://github.com/unicode-org/icu4x/blob/21b7e1c0df46311bb88c2b98446b77bc48bb8f7a/tools/make/diplomat-coverage/src/allowlist.rs#L180

In general we don't have great Locale FFI coverage. We should just holistically add all the functionality.

sffc avatar Jun 16 '25 05:06 sffc