-
Kirill Smelkov authored
On Windows in text mode files are opened with encoding=locale.getdefaultlocale() which is CP125X instead of UTF-8 even if $PYTHONIOENCODING=UTF-8. This way e.g. test_strings_print fail as: E Failed: not equal: E Expected: E print(qq(b)): "привет О±ОІОі b" E print(qq(u)): "привет О±ОІОі u" E Got: E print(qq(b)): "привет αβγ b" E print(qq(u)): "привет αβγ u" where "Expected" was read from golang/testprog/golang_test_str.txt and decoded wrongly. -> Fix it by always opening files for reading in binary mode and utf8-decoding manually, if needed, everywhere.
a5349f5d