From cc46cd88a1b84b02694fa6d88c4286e93336f096 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Fri, 26 Jan 2018 14:25:39 -0800 Subject: [PATCH] In generate-expected-outputs read the test definition with utf8 encoding. --- test/subset/generate-expected-outputs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/subset/generate-expected-outputs.py b/test/subset/generate-expected-outputs.py index 87db5d5b1..f6636de7e 100755 --- a/test/subset/generate-expected-outputs.py +++ b/test/subset/generate-expected-outputs.py @@ -3,6 +3,7 @@ # Pre-generates the expected output subset files (via fonttools) for # specified subset test suite(s). +import io import os import sys @@ -26,7 +27,7 @@ if not args: usage() for path in args: - with open(path, 'r') as f: + with io.open(path, mode="r", encoding="utf-8") as f: test_suite = SubsetTestSuite(path, f.read()) output_directory = test_suite.get_output_directory()