diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2013-02-20 18:16:56 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2013-02-20 18:16:56 +0900 |
commit | 18415352643a88e4609d466eb0ba00739b3b5f87 (patch) | |
tree | 50171693063e5e8840cd89b0736c20fc5ab44df3 /engine | |
parent | 2690b6ccb27cb14a8878b8ce1bf4540ae6c78b40 (diff) | |
download | ibus-anthy-18415352643a88e4609d466eb0ba00739b3b5f87.tar.gz |
Fixed to convert yen to U+30FC in kana mode. (#1596)
Diffstat (limited to 'engine')
-rw-r--r-- | engine/kana.py | 9 | ||||
-rw-r--r-- | engine/romaji.py | 9 |
2 files changed, 4 insertions, 14 deletions
diff --git a/engine/kana.py b/engine/kana.py index 01da82d..eea2fac 100644 --- a/engine/kana.py +++ b/engine/kana.py @@ -105,13 +105,8 @@ class KanaSegment(segment.Segment): value = None section = self._kana_typing_rule_section if section != None: - try: - # U+A5 needs to be UTF-8 since gconf values are - # disk saved values. - enchars = enchars.encode('utf-8') - except: - print >> sys.stderr, \ - 'Failed to encode UTF-8:', enchars + # Need to send Unicode to typing_to_config_key instead of UTF-8 + # not to separate U+A5 gkey = prefs.typing_to_config_key(enchars) if gkey == '': return None diff --git a/engine/romaji.py b/engine/romaji.py index 2430cce..056c3b2 100644 --- a/engine/romaji.py +++ b/engine/romaji.py @@ -58,13 +58,8 @@ class RomajiSegment(segment.Segment): value = None section = self._romaji_typing_rule_section if section != None: - try: - # U+A5 needs to be UTF-8 since gconf values are - # disk saved values. - enchars = enchars.encode('utf-8') - except: - print >> sys.stderr, \ - 'Failed to encode UTF-8:', enchars + # Need to send Unicode to typing_to_config_key instead of UTF-8 + # not to separate U+A5 gkey = prefs.typing_to_config_key(enchars) if gkey == '': return None |