mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 18:25:57 +00:00
ICU-13634 Strict mode on scientific formatter requires exponents; changing scanf in iotest to use lenient mode instead.
X-SVN-Rev: 41241
This commit is contained in:
parent
49876dffda
commit
6a2bc42216
1 changed files with 8 additions and 0 deletions
|
@ -54,6 +54,10 @@ static inline UNumberFormat * copyInvariantFormatter(ULocaleBundle *result, UNum
|
|||
UErrorCode status = U_ZERO_ERROR;
|
||||
UNumberFormat *formatAlias = unum_open(style, NULL, 0, "en_US_POSIX", NULL, &status);
|
||||
if (U_SUCCESS(status)) {
|
||||
// ICU 62 requires exponent on strict scientific parser, but we don't want that here
|
||||
if (style == UNUM_SCIENTIFIC) {
|
||||
unum_setAttribute(formatAlias, UNUM_LENIENT_PARSE, TRUE);
|
||||
}
|
||||
gPosixNumberFormat[style-1] = formatAlias;
|
||||
ucln_io_registerCleanup(UCLN_IO_LOCBUND, locbund_cleanup);
|
||||
}
|
||||
|
@ -174,6 +178,10 @@ u_locbund_getNumberFormat(ULocaleBundle *bundle, UNumberFormatStyle style)
|
|||
formatAlias = NULL;
|
||||
}
|
||||
else {
|
||||
// ICU 62 requires exponent on strict scientific parser, but we don't want that here
|
||||
if (style == UNUM_SCIENTIFIC) {
|
||||
unum_setAttribute(formatAlias, UNUM_LENIENT_PARSE, TRUE);
|
||||
}
|
||||
bundle->fNumberFormat[style-1] = formatAlias;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue