Disable Unicode 6.1 - 8.0 emojis
Old devices don't support such emojis, so it is better to not support
them in rewriter (C++) layer for now.
NOTE:
Some Unicode 6.0 emoji doesn't have PUA code point (e.g. WAXING CRESCENT
MOON). However, it was not supported on Mozc, so this change should be
acceptable.
BUG=
TEST=
REF_BUG=25530074
REF_CL=107756062
Hiroshi Sumita
8 years ago
0 | 0 |
MAJOR=2
|
1 | 1 |
MINOR=17
|
2 | |
BUILD=2380
|
|
2 |
BUILD=2381
|
3 | 3 |
REVISION=102
|
4 | 4 |
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
|
5 | 5 |
# downloaded by NaCl Mozc.
|
98 | 98 |
logging.critical('format error: %s', '\t'.join(columns))
|
99 | 99 |
sys.exit(1)
|
100 | 100 |
|
|
101 |
code_points = columns[0].split(' ')
|
|
102 |
|
101 | 103 |
# Emoji code point.
|
102 | 104 |
emoji = columns[1]
|
103 | 105 |
|
|
107 | 109 |
docomo_description = columns[9]
|
108 | 110 |
softbank_description = columns[10]
|
109 | 111 |
kddi_description = columns[11]
|
|
112 |
|
|
113 |
if not android_pua or len(code_points) > 1:
|
|
114 |
# Skip some emoji, which is not supported on old devices.
|
|
115 |
# - Unicode 6.1 or later emoji which doesn't have PUA code point.
|
|
116 |
# - Composite emoji which has multiple code point.
|
|
117 |
# NOTE: Some Unicode 6.0 emoji don't have PUA, and it is also omitted.
|
|
118 |
# TODO(hsumita): Check the availability of such emoji and enable it.
|
|
119 |
logging.info('Skip %s', ' '.join(code_points))
|
|
120 |
continue
|
110 | 121 |
|
111 | 122 |
reading_list = []
|
112 | 123 |
# \xe3\x80\x80 is a full-width space
|
87 | 87 |
logging.critical('format error: %s', '\t'.join(columns))
|
88 | 88 |
sys.exit(1)
|
89 | 89 |
|
|
90 |
code_points = columns[0].split(' ')
|
90 | 91 |
# Emoji code point.
|
91 | 92 |
emoji = columns[1] if columns[1] else None
|
92 | 93 |
android_pua = ParseCodePoint(columns[2])
|
|
101 | 102 |
docomo_description = columns[9] if columns[9] else None
|
102 | 103 |
softbank_description = columns[10] if columns[10] else None
|
103 | 104 |
kddi_description = columns[11] if columns[11] else None
|
|
105 |
|
|
106 |
if not android_pua or len(code_points) > 1:
|
|
107 |
# Skip some emoji, which is not supported on old devices.
|
|
108 |
# - Unicode 6.1 or later emoji which doesn't have PUA code point.
|
|
109 |
# - Composite emoji which has multiple code point.
|
|
110 |
# NOTE: Some Unicode 6.0 emoji don't have PUA, and it is also omitted.
|
|
111 |
# TODO(hsumita): Check the availability of such emoji and enable it.
|
|
112 |
logging.info('Skip %s', ' '.join(code_points))
|
|
113 |
continue
|
104 | 114 |
|
105 | 115 |
# Check consistency between carrier PUA codes and descriptions for Android
|
106 | 116 |
# just in case.
|