This change gives us 46 new passes on the IdnaTestV2 test collection, with just 6 failures remaining
(to be resolved by the next patch).
Differential Revision: https://phabricator.services.mozilla.com/D186866
ICU4X will be used by ECMA-402 implementation at future. So we should link it
to SpiderMonkey instead of libxul only.
Depends on D178157
Differential Revision: https://phabricator.services.mozilla.com/D167673
ICU4X will be used by ECMA-402 implementation at future. So we should link it
to SpiderMonkey instead of libxul only.
Depends on D178157
Differential Revision: https://phabricator.services.mozilla.com/D167673
The `GetNamedTimeZoneEpochNanoseconds`, `GetNamedTimeZoneNextTransition`, and
`GetNamedTimeZonePreviousTransition` abstract operations from the Temporal API
proposal require these additional methods.
Differential Revision: https://phabricator.services.mozilla.com/D174287
Required updates for the next patch in this stack.
Also replaces `PluralRulesOptions::RoundingPriority` with an alias to
`NumberFormatOptions::RoundingPriority`, so we don't have to duplicate the
`RoundingPriority` and `RoundingMode` enums.
Differential Revision: https://phabricator.services.mozilla.com/D179946
- Update the URL because the "core.zip" is no longer present.
- Add code to remove redundant language mappings.
Depends on D176265
Differential Revision: https://phabricator.services.mozilla.com/D176266
No change in behavior; this just gives us our own version of the general category constants,
so we can avoid depending on ICU's constants elsewhere in the codebase.
Differential Revision: https://phabricator.services.mozilla.com/D173203
The data for a bunch of locales was updated in ICU 72 to use U+202F and U+2009 in places where previously it had regular Space characters.
Unfortunately, this breaks some sites that attempt to parse the formatted output using naive regular expressions (or similar)
that just expect space, rather than "any whitespace", and fail to match against the new formatted output.
To mitigate this, until more browsers update to the newer ICU/CLDR data and pressure builds on sites to fix such fragile scripts,
we can post-process the formatted output from ICU to replace these "special" spaces with standard ASCII space characters.
This workaround is designed to be easily disabled at build time by just changing the DATE_TIME_FORMAT_REPLACE_SPECIAL_SPACES #define,
when we're ready to try re-enabling the updated formats.
Differential Revision: https://phabricator.services.mozilla.com/D165408
Steps performed:
- Add "microsecond" and "nanosecond" to "intl/icu/data_filter.json".
- Run "icu_sources_data.py" to update the ICU data file.
- Run "update-tzdata.sh" to reapply the tzdata 2022f changes.
- Add "microsecond" and "nanosecond" to "SanctionedSimpleUnitIdentifiers.yaml".
- Run "make_intl_data.py units" to regenerate additional SpiderMonkey files.
Spec PR: https://github.com/tc39/ecma402/pull/708
Differential Revision: https://phabricator.services.mozilla.com/D161676
This was regressed by bug 1788115, which allowed us to parse ASCII labels
again to enforce they're valid. However, the existing code only checked for
invalid punycode (that fails decoding), not ACE labels that are invalid.
If we don't check for this condition uidna_labelToUnicode will add a U+FFFD
character to the end of the label, making us encode it again, changing the URL.
When that happens, the principal's origin may change between serializations,
which is not OK.
Depends on D159373
Differential Revision: https://phabricator.services.mozilla.com/D160785
This is actually exploiting an ICU bug, but ensures we return the same results
as other browsers. When the ICU bug has been fixed, we can revert this back to
"G".
Differential Revision: https://phabricator.services.mozilla.com/D156413
For this to work, we need to add a move-constructor to `Locale`, so that it's
possible to write `loc = {}`. (We need move instead of copy semantics, because
`Locale` has UniquePtr members.) All other `Locale` members except for
`LanguageTagSubtag` already support move semantics. Add copy-constructors to
`LanguageTagSubtag`, so defaulted move-constructor/assignment works for `Locale`.
`LanguageTagSubtag` gets copy- instead of move-constructors, because there isn't
a good reason to disallow copying when moving is allowed.
Also add extra assertions and comments to document the requirement that `TryParse`
expects a new, empty `Locale`.
Differential Revision: https://phabricator.services.mozilla.com/D154496
`TryCreateFromSkeleton()` is only called internally in `DateTimeFormat`, so we
can make it a private method to reduce the API surface.
Differential Revision: https://phabricator.services.mozilla.com/D145583
All callers were passing `Nothing()` for the hour-cycle override parameter, so
we might as well remove the parameter from the public API surface.
Differential Revision: https://phabricator.services.mozilla.com/D145580
- `UCAL_TZ_LOCAL_FORMER` and `UCAL_TZ_LOCAL_FORMER` are now stable.
- `UNUM_APPROXIMATELY_SIGN_FIELD` is a new draft API.
Depends on D143281
Differential Revision: https://phabricator.services.mozilla.com/D143282