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

[6.2.0]Force the Bazel server Java runtime to use the root locale #17733

Merged
merged 3 commits into from
Mar 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/main/cpp/blaze.cc
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,13 @@ static vector<string> GetServerExeArgs(const blaze_util::Path &jvm_path,

// Force use of latin1 for file names.
result.push_back("-Dfile.encoding=ISO-8859-1");
// Force into the root locale to ensure consistent behavior of string
// operations across machines (e.g. in the tr_TR locale, capital ASCII 'I'
// turns into a special Unicode 'i' when converted to lower case).
// https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Locale.html#ROOT
result.push_back("-Duser.country=");
result.push_back("-Duser.language=");
result.push_back("-Duser.variant=");

if (startup_options.host_jvm_debug) {
BAZEL_LOG(USER)
Expand Down