Enumerated properties should have to/from ICU4C APIs #6067
Labels
C-unicode
Component: Props, sets, tries
needs-approval
One or more stakeholders need to approve proposal
Milestone
Our enumerated properties are opaque wrappers around integers, using the same values used by ICU4C.
It's reasonable to abstract away our internal implementation, but the ICU4C values are pretty standard across i18n code, and it's reasonable to wish to access these values.
We should offer to/from u8 (or u16) APIs.
I propose we name them
to_icu4c_value()
andfrom_icu4c_value()
, linking to ICU4C docs. There is no fallibility, unknown values are accepted.I am not opposed to just having Into/From and documenting the impl as stably producing ICU4C values.
cc @sffc @echeran @robertbastian
The text was updated successfully, but these errors were encountered: