ext/intl: Migrate formatter, listformatter, and rangeformatter from I…#21378
Open
devnexen wants to merge 2 commits intophp:masterfrom
Open
ext/intl: Migrate formatter, listformatter, and rangeformatter from I…#21378devnexen wants to merge 2 commits intophp:masterfrom
devnexen wants to merge 2 commits intophp:masterfrom
Conversation
…CU C API to C++ API. - formatter: Replace intl_convert_utf8_to_utf16/uloc_getISO3Language with intl_stringFromChar/icu::Locale, use UnicodeString for pattern handling - listformatter: Replace ulistfmt_open/ulistfmt_openForType/ulistfmt_close/ ulistfmt_format with ListFormatter C++ equivalents, use UnicodeString array and intl_stringFromChar/intl_charFromString for string conversions - rangeformatter: Replace uloc_getISO3Language with icu::Locale::getISO3Language
Replace UNumberFormat*/unum_* with icu::NumberFormat C++ equivalents. Attribute get/set still use reinterpret_cast<UNumberFormat*> for now. Note: formatter_fail.phpt expectation updated because NumberFormat::createInstance() returns U_ILLEGAL_ARGUMENT_ERROR for out-of-range styles (style < 0), whereas unum_open() returned U_UNSUPPORTED_ERROR via its default switch case.
d812f7c to
e6e5a66
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…CU C API to C++ API.