diff --git a/src/node.cc b/src/node.cc index 78a72e3263016b..37d4309aa0c39a 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3692,7 +3692,7 @@ static void ParseArgs(int* argc, #endif /* HAVE_OPENSSL */ #if defined(NODE_HAVE_I18N_SUPPORT) } else if (strncmp(arg, "--icu-data-dir=", 15) == 0) { - icu_data_dir.assign(arg, 15); + icu_data_dir.assign(arg + 15); #endif } else if (strcmp(arg, "--expose-internals") == 0 || strcmp(arg, "--expose_internals") == 0) { diff --git a/test/parallel/test-intl-no-icu-data.js b/test/parallel/test-intl-no-icu-data.js index dd14c146719fb1..ce5e9a08121cdc 100644 --- a/test/parallel/test-intl-no-icu-data.js +++ b/test/parallel/test-intl-no-icu-data.js @@ -2,6 +2,8 @@ 'use strict'; require('../common'); const assert = require('assert'); +const config = process.binding('config'); // No-op when ICU case mappings are unavailable. assert.strictEqual('ç'.toLocaleUpperCase('el'), 'ç'); +assert.strictEqual(config.icuDataDir, 'test/fixtures/empty/');