bazel icon indicating copy to clipboard operation
bazel copied to clipboard

Force a UTF-8 locale when `en_US.ISO-8859-1` is not available

Open fmeum opened this issue 6 months ago • 3 comments

This provides UTF-8 support on systems that don't have valid locale settings by default and also don't provide the en_US.ISO-8859-1 locale.

Also show a warning if Bazel fails to force such a locale and falls back to ASCII.

Fixes #26259

fmeum avatar Jun 12 '25 13:06 fmeum

@hanwen-flow Could you test this PR on your machine? I would like to make sure that it actually resolves the issue for you and doesn't just show a warning.

fmeum avatar Jun 12 '25 13:06 fmeum

@fmeum - I'll try to have a look early next week.

hanwen-flow avatar Jun 12 '25 13:06 hanwen-flow

I manually verified that this results in sun.jnu.encoding = UTF-8 on a Linux machine without the en_US.ISO-8859-1 locale installed and with LC_ALL=C set on server startup, so I'm positive that this does fix the issue.

fmeum avatar Jun 12 '25 13:06 fmeum

Can we merge this issue soon? It is keeping me from enabling last_green tests on a couple of my repositories. Thanks!

cgrindel avatar Jun 29 '25 16:06 cgrindel

@tjgq Friendly ping

fmeum avatar Jul 15 '25 09:07 fmeum

@tjgq Friendly ping

Sorry for the delay - it's under internal review now

tjgq avatar Jul 15 '25 15:07 tjgq

@bazel-io fork 8.4.0

fmeum avatar Jul 16 '25 10:07 fmeum