Skip to content

Commit

Permalink
get_grapheme_cluster_break_tests_as_UTF8 can break when locale isn't
Browse files Browse the repository at this point in the history
UTF-8

When codecs.open is called encoding needs to be utf8 instead of
a query of getfilesystemencoding() as it could be ascii.
  • Loading branch information
tom-gall committed Jan 5, 2016
1 parent 3f19714 commit 268b7fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/GYBUnicodeDataUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ def _convert_line(line):

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:
Expand Down

0 comments on commit 268b7fa

Please sign in to comment.