aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-07-16 12:37:45 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-07-16 13:03:40 +0200
commit28c93ce4af25750b721e2dcaebb1864d509edd32 (patch)
treedc899c7b9c7bfaea9fa9a465017acc310d261f98 /mesonbuild/backend/backends.py
parentd7a682fdede536dd95f76425ac9e06faf334199c (diff)
downloadmeson-28c93ce4af25750b721e2dcaebb1864d509edd32.zip
meson-28c93ce4af25750b721e2dcaebb1864d509edd32.tar.gz
meson-28c93ce4af25750b721e2dcaebb1864d509edd32.tar.bz2
work around failure of test 185 in single-byte locales
The Windows CI runs with codepage 1252, which is basically ISO-8859-1 and does not have a mapping for character U+0151 (Å‘). It is currently passing because of a happy accident, as the generator command line is emitted in UTF-8 anyway (starting at commit 6089631a, "Open build files with utf-8", 2018-04-17, which however lacks documentation or history) and file.py treats it as two single-byte characters. When going through meson_exe, however, Windows passes a genuine Unicode character via CreateProcessW and file.py fails to decode it, so we need to pass errors='replace' when opening the output file. On Windows, the test is then fixed. On POSIX systems it is _still_ passing as a happy accident because (according to the current locale) the output file contains two single-byte characters rather than the single Unicode character "Å‘"; in fact, if one modifies the ninja backend to use force_serialize=True, meson_exe fails to build the command line for file.py and stops with a UnicodeEncodeError.
Diffstat (limited to 'mesonbuild/backend/backends.py')
0 files changed, 0 insertions, 0 deletions