Index: modules/IMEngine/scim_rawcode_imengine.cpp =================================================================== RCS file: /cvsroot/scim/scim/modules/IMEngine/scim_rawcode_imengine.cpp,v retrieving revision 1.7.2.5 retrieving revision 1.7.2.6 diff -u -r1.7.2.5 -r1.7.2.6 --- modules/IMEngine/scim_rawcode_imengine.cpp 12 Jan 2006 07:00:36 -0000 1.7.2.5 +++ modules/IMEngine/scim_rawcode_imengine.cpp 18 Jan 2006 05:44:52 -0000 1.7.2.6 @@ -23,7 +23,7 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA * - * $Id: scim_rawcode_imengine.cpp,v 1.7.2.5 2006/01/12 07:00:36 suzhe Exp $ + * $Id: scim_rawcode_imengine.cpp,v 1.7.2.6 2006/01/18 05:44:52 suzhe Exp $ * */ @@ -430,9 +430,20 @@ } if (m_unicode) { - if (m_preedit_string.length () >= 3 && m_preedit_string.length () < 6 && create_lookup_table () > 0) { + size_t maxlen = 6; + + if (m_preedit_string.length () > 0) { + if (m_preedit_string [0] == '0') + maxlen = 4; + else if (m_preedit_string [0] == '1') + maxlen = 6; + else + maxlen = 5; + } + + if (m_preedit_string.length () >= 3 && m_preedit_string.length () < maxlen && create_lookup_table () > 0) { update_lookup_table (m_lookup_table); - } else if (m_preedit_string.length () == 6) { + } else if (m_preedit_string.length () == maxlen) { WideString str; ucs4_t code = get_unicode_value (m_preedit_string);