diff --git a/src/mozc_version_template.txt b/src/mozc_version_template.txt index 1a7ba4f..0db0de9 100644 --- a/src/mozc_version_template.txt +++ b/src/mozc_version_template.txt @@ -1,6 +1,6 @@ MAJOR=2 MINOR=17 -BUILD=2380 +BUILD=2381 REVISION=102 # NACL_DICTIONARY_VERSION is the target version of the system dictionary to be # downloaded by NaCl Mozc. diff --git a/src/prediction/gen_zero_query_data.py b/src/prediction/gen_zero_query_data.py index 222232d..69f85a3 100644 --- a/src/prediction/gen_zero_query_data.py +++ b/src/prediction/gen_zero_query_data.py @@ -99,6 +99,8 @@ logging.critical('format error: %s', '\t'.join(columns)) sys.exit(1) + code_points = columns[0].split(' ') + # Emoji code point. emoji = columns[1] @@ -108,6 +110,15 @@ docomo_description = columns[9] softbank_description = columns[10] kddi_description = columns[11] + + if not android_pua or len(code_points) > 1: + # Skip some emoji, which is not supported on old devices. + # - Unicode 6.1 or later emoji which doesn't have PUA code point. + # - Composite emoji which has multiple code point. + # NOTE: Some Unicode 6.0 emoji don't have PUA, and it is also omitted. + # TODO(hsumita): Check the availability of such emoji and enable it. + logging.info('Skip %s', ' '.join(code_points)) + continue reading_list = [] # \xe3\x80\x80 is a full-width space diff --git a/src/rewriter/gen_emoji_rewriter_data.py b/src/rewriter/gen_emoji_rewriter_data.py index 91b7feb..9793657 100644 --- a/src/rewriter/gen_emoji_rewriter_data.py +++ b/src/rewriter/gen_emoji_rewriter_data.py @@ -88,6 +88,7 @@ logging.critical('format error: %s', '\t'.join(columns)) sys.exit(1) + code_points = columns[0].split(' ') # Emoji code point. emoji = columns[1] if columns[1] else None android_pua = ParseCodePoint(columns[2]) @@ -102,6 +103,15 @@ docomo_description = columns[9] if columns[9] else None softbank_description = columns[10] if columns[10] else None kddi_description = columns[11] if columns[11] else None + + if not android_pua or len(code_points) > 1: + # Skip some emoji, which is not supported on old devices. + # - Unicode 6.1 or later emoji which doesn't have PUA code point. + # - Composite emoji which has multiple code point. + # NOTE: Some Unicode 6.0 emoji don't have PUA, and it is also omitted. + # TODO(hsumita): Check the availability of such emoji and enable it. + logging.info('Skip %s', ' '.join(code_points)) + continue # Check consistency between carrier PUA codes and descriptions for Android # just in case.