deps: backport ICU-20558 to fix Intl crasher
- Floating patch for ICU 63.x and 64.x - fixing crash in Intl when ICU data not found. - Regression test from refack included. Background: - ICU-13778 (landed in ICU 63.1) fixed a bug but added a regression. - a recent v8 land in Node v12 (which one?) exposes this bug to cause a crash when ICU data is not found. ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20558 Backport of: https://github.com/unicode-org/icu/pull/632 Fixes: https://github.com/nodejs/node/issues/27379 Co-authored-by: Refael Ackermann <refack@gmail.com> PR-URL: https://github.com/nodejs/node/pull/27415 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
This commit is contained in:
parent
f4c77f9118
commit
617c55ebe5
@ -22,6 +22,7 @@
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const { execFile } = require('child_process');
|
||||
|
||||
// Does node think that i18n was enabled?
|
||||
let enablei18n = process.config.variables.v8_enable_i18n_support;
|
||||
@ -125,4 +126,14 @@ if (!common.hasIntl) {
|
||||
assert.strictEqual(coll.compare('Bluebird', 'bluebird'), 0);
|
||||
// `ffi` ligature (contraction)
|
||||
assert.strictEqual(coll.compare('\ufb03', 'ffi'), 0);
|
||||
|
||||
{
|
||||
// Regression test for https://github.com/nodejs/node/issues/27379
|
||||
const env = { ...process.env, LC_ALL: 'ja' };
|
||||
execFile(
|
||||
process.execPath, ['-p', 'new Date().toLocaleString()'],
|
||||
{ env },
|
||||
common.mustCall((e) => assert.ifError(e))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
2752
tools/icu/patches/63/source/i18n/dtptngen.cpp
Normal file
2752
tools/icu/patches/63/source/i18n/dtptngen.cpp
Normal file
File diff suppressed because it is too large
Load Diff
2778
tools/icu/patches/64/source/i18n/dtptngen.cpp
Normal file
2778
tools/icu/patches/64/source/i18n/dtptngen.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user