diff --git a/src/node.cc b/src/node.cc index fb85af7227..ce49a5c431 100644 --- a/src/node.cc +++ b/src/node.cc @@ -4191,6 +4191,14 @@ void Init(int* argc, DispatchDebugMessagesAsyncCallback)); uv_unref(reinterpret_cast(&dispatch_debug_messages_async)); +#if defined(NODE_HAVE_I18N_SUPPORT) + // Set the ICU casing flag early + // so the user can disable a flag --foo at run-time by passing + // --no_foo from the command line. + const char icu_case_mapping[] = "--icu_case_mapping"; + V8::SetFlagsFromString(icu_case_mapping, sizeof(icu_case_mapping) - 1); +#endif + #if defined(NODE_V8_OPTIONS) // Should come before the call to V8::SetFlagsFromCommandLine() // so the user can disable a flag --foo at run-time by passing diff --git a/test/parallel/test-intl.js b/test/parallel/test-intl.js index 938099f2e3..1058650830 100644 --- a/test/parallel/test-intl.js +++ b/test/parallel/test-intl.js @@ -50,6 +50,11 @@ if (!common.hasIntl) { return; } + // Check casing + { + assert.strictEqual('I'.toLocaleLowerCase('tr'), 'ı'); + } + // Check with toLocaleString { const localeString = dtf.format(date0);