summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2015-09-30 23:26:54 -0700
committerRoozbeh Pournader <roozbeh@google.com>2015-10-14 16:32:17 -0700
commite5e7aa0e8031f6f1c0ed370f70e49778f3570527 (patch)
treee7bc8aa6e2f55bb87e1db46e5302a481961ce3dc
parent6e2cccdc518f8d3424c84ae6fbe0e87ae3c3f66a (diff)
downloadandroid_frameworks_minikin-e5e7aa0e8031f6f1c0ed370f70e49778f3570527.tar.gz
android_frameworks_minikin-e5e7aa0e8031f6f1c0ed370f70e49778f3570527.tar.bz2
android_frameworks_minikin-e5e7aa0e8031f6f1c0ed370f70e49778f3570527.zip
Explicitly set utf-8 encoding for hyb file verification
Not all platforms default to UTF-8 encoding, so we set it explicitly. This patch should fix build breakages resulting from failed verification of binary hyb files for hyphenation patterns. Bug: 24570591 Change-Id: I65ac4536d3436586c2633e2b57554fc6ff16d3a8 (cherry picked from commit 138b93f094584212dd6978a1822d078f93574022)
-rwxr-xr-xtools/mk_hyb_file.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/mk_hyb_file.py b/tools/mk_hyb_file.py
index c078454..978c082 100755
--- a/tools/mk_hyb_file.py
+++ b/tools/mk_hyb_file.py
@@ -416,7 +416,7 @@ def generate_hyb_file(hyph, ch_map, hyb_fn):
# Verify that the file contains the same lines as the lines argument, in arbitrary order
def verify_file_sorted(lines, fn):
- file_lines = [l.strip() for l in io.open(fn)]
+ file_lines = [l.strip() for l in io.open(fn, encoding='UTF-8')]
line_set = set(lines)
file_set = set(file_lines)
if line_set == file_set: