mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user