diff -uNr ibus-table-1.3.9.20110827/engine/tabdict.py ibus-table-1.3.9.20110827.new/engine/tabdict.py --- ibus-table-1.3.9.20110827/engine/tabdict.py 2011-08-26 23:11:32.000000000 +0800 +++ ibus-table-1.3.9.20110827.new/engine/tabdict.py 2012-03-10 20:48:09.242331184 +0800 @@ -26,7 +26,6 @@ sys.setdefaultencoding('utf-8') tab_dict = { - '0':0, 'a':1, 'b':2, 'c':3, 'd':4, 'e':5, 'f':6, 'g':7, 'h':8, 'i':9, 'j':10, 'k':11, 'l':12, 'm':13, 'n':14, 'o':15, diff -uNr ibus-table-1.3.9.20110827/engine/table.py ibus-table-1.3.9.20110827.new/engine/table.py --- ibus-table-1.3.9.20110827/engine/table.py 2011-08-27 00:10:09.000000000 +0800 +++ ibus-table-1.3.9.20110827.new/engine/table.py 2012-03-10 20:48:54.890329561 +0800 @@ -113,13 +113,12 @@ else: __lc = os.environ['LANG'].split('.')[0].lower() - if __lc.find('zh_') == 0: - # this is a zh_XX - __place =__lc.split('_')[1] - if __place == 'cn': - return 0 - else: - return 1 + if __lc.find('_cn') != -1: + return 0 + # hk and tw is should use tc as default + elif __lc.find('_hk') != -1 or __lc.find('_tw') != -1\ + or __lc.find('_mo') != -1: + return 1 else: if self.db._is_chinese: # if IME declare as Chinese IME @@ -128,7 +127,7 @@ return -1 except: return -1 - + def change_chinese_mode (self): if self._chinese_mode != -1: self._chinese_mode = (self._chinese_mode +1 ) % 5