LibUnicode: Use ICU to convert Unicode keywords to their BCP 47 value

We were manually doing this for the calendar keyword, and would need to
do so for the collation keyword as well. I wasn't aware of this API
originally, so let's start using it.
This commit is contained in:
Timothy Flynn 2025-06-02 14:15:05 -04:00 committed by Shannon Booth
parent 486602e796
commit 21cff645a2
Notes: github-actions[bot] 2025-06-02 21:05:02 +00:00
3 changed files with 18 additions and 21 deletions

View file

@ -107,7 +107,7 @@ static Vector<String> icu_available_time_zones(Optional<ByteString> const& regio
if (icu_failure(status))
return { "UTC"_string };
auto time_zones = icu_string_enumeration_to_list(move(time_zone_enumerator), [](char const* zone) {
auto time_zones = icu_string_enumeration_to_list(move(time_zone_enumerator), nullptr, [](char const* zone) {
return !is_legacy_non_iana_time_zone({ zone, strlen(zone) });
});