get_grapheme_cluster_break_tests_as_UTF8 can break when locale isn't

UTF-8

When codecs.open is called encoding needs to be utf8 instead of
a query of getfilesystemencoding() as it could be ascii.
This commit is contained in:
Tom Gall
2016-01-05 14:44:14 -06:00
parent 3f19714479
commit 268b7fa8b5

View File

@@ -548,7 +548,7 @@ def get_grapheme_cluster_break_tests_as_UTF8(grapheme_break_test_file_name):
result = []
with codecs.open(grapheme_break_test_file_name, encoding=sys.getfilesystemencoding(), errors='strict') as f:
with codecs.open(grapheme_break_test_file_name, encoding='utf-8', errors='strict') as f:
for line in f:
test = _convert_line(line)
if test: