Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: default --icu_case_mapping on as a v8 option #9454

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4191,6 +4191,14 @@ void Init(int* argc,
DispatchDebugMessagesAsyncCallback));
uv_unref(reinterpret_cast<uv_handle_t*>(&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
Expand Down
5 changes: 5 additions & 0 deletions test/parallel/test-intl.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ if (!common.hasIntl) {
return;
}

// Check casing
{
assert.strictEqual('I'.toLocaleLowerCase('tr'), 'ı');
}

// Check with toLocaleString
{
const localeString = dtf.format(date0);
Expand Down