From 131392748fe6b4d14a4dcbf3f5c79e56b2f0f142 Mon Sep 17 00:00:00 2001 From: Roozbeh Pournader Date: Wed, 22 Feb 2017 18:48:18 -0800 Subject: [PATCH] Add exception for Bulgarian to mk_hyb_file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Bulgarian hyphenation patterns contain a line consisting of '0ь0' which has no practical effect on hyphenation. Add an exception in roundtrip testing to make sure we don't fail while comparing our tables with the input data. Test: make -j works and creates .hyb files for bg and cu Change-Id: Ia46b8a45fe522f5194d8105d31b34b0e27528cc9 (cherry picked from commit 6308ea4c4b4652f061a646d164d5fdc941a25ba2) --- engine/src/flutter/tools/mk_hyb_file.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/src/flutter/tools/mk_hyb_file.py b/engine/src/flutter/tools/mk_hyb_file.py index 978c082b27..a9b8932c95 100755 --- a/engine/src/flutter/tools/mk_hyb_file.py +++ b/engine/src/flutter/tools/mk_hyb_file.py @@ -539,6 +539,12 @@ def verify_hyb_file(hyb_fn, pat_fn, chr_fn, hyp_fn): patterns = [] exceptions = [] traverse_trie(0, '', trie_data, ch_map, pattern_data, patterns, exceptions) + + # EXCEPTION for Bulgarian (bg), which contains an ineffectual line of <0, U+044C, 0> + if u'\u044c' in patterns: + patterns.remove(u'\u044c') + patterns.append(u'0\u044c0') + assert verify_file_sorted(patterns, pat_fn), 'pattern table not verified' assert verify_file_sorted(exceptions, hyp_fn), 'exception table not verified'