Skip to content

Commit 30fc150

Browse files
committed
Set locale .utf-8
1 parent 6f946c9 commit 30fc150

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/node_main.cc

+3
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ int wmain(int argc, wchar_t* wargv[]) {
8787
}
8888
}
8989
argv[argc] = nullptr;
90+
// CodePage 932 and similar environments cannot correctly handle file names with std::filesystem.
91+
// Therefore, force .utf-8 encoding with locale to enable proper processing.
92+
std::locale::global(std::locale{".utf-8"});
9093
// Now that conversion is done, we can finally start.
9194
return node::Start(argc, argv);
9295
}

0 commit comments

Comments
 (0)