ibus Cangjie handling on Ubuntu 11.10

If you are using scim on Ubuntu 11.10, the type and search doesn't work at the file manager.

The problem is at this python script:

/usr/share/ibus-table/engine/table.py

def get_chinese_mode (self)
    '''Use LC_CTYPE in your box to determine the _chinese_mode'''
    try:
        if os.environ.has_key('LC_CTYPE'):
            __lc = os.environ['LC_CTYPE'].split('.')[0].lower()
        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
        else:
            if self.db._is_chinese:
                # if IME declare as Chinese IME
                # changed it from return 0 to return 1
                return 1
            else:
                return -1
    except:
        return -1