diff --git a/llvm/test/tools/llvm-ar/mri-utf8.test b/llvm/test/tools/llvm-ar/mri-utf8.test --- a/llvm/test/tools/llvm-ar/mri-utf8.test +++ b/llvm/test/tools/llvm-ar/mri-utf8.test @@ -16,8 +16,11 @@ # include arguments with non-ascii characters. # Python on Linux defaults to ASCII encoding unless the # environment specifies otherwise, so it is explicitly set. +# The locale chosen is C.UTF-8 as being the most likely to +# be available on a system, in particular on a minimal +# system like a docker image. # The reliance the test has on this locale is not ideal, # however alternate solutions have been difficult due to # behaviour differences with python 2 vs python 3, -# and linux vs windows. -RUN: env LANG=en_US.UTF-8 %python -c "assert open(u'\U000000A3.txt', 'rb').read() == b'contents\n'" +# and linux vs windows. The C.UTF-8 locale is chosen +RUN: env LANG=C.UTF-8 %python -c "assert open(u'\xA3.txt', 'rb').read() == b'contents\n'"