If uim-xim gets "EUC" by XIM_ENCODING_NEGOTIATION (ex. LANG=ja on Solaris10), uim-xim sends no XIM_COMMIT. XIM_COMMIT does not appear in uim-xim --trace-xim output when a string is committed. When encoding is "EUC", iconv_open() fails and uStringToCtext() returns NULL. This patch changes XimIM::set_encoding() to make "eucJP" from 'encoding' and 'mLangRegion' when 'encoding' is "EUC". diff -ur tmp/uim-1.1.1/xim/ximim.cpp uim-1.1.1/xim/ximim.cpp --- tmp/uim-1.1.1/xim/ximim.cpp Fri Jul 7 11:16:24 2006 +++ uim-1.1.1/xim/ximim.cpp Tue Jul 18 08:34:09 2006 @@ -418,7 +418,15 @@ { if (mEncoding) free(mEncoding); - mEncoding = strdup(encoding); + char *p; + if (!strcasecmp(encoding, "EUC") && mLangRegion && (p = strchr(mLangRegion, '_'))) { + mEncoding = (char *)malloc(3 + strlen(p+1) + 1); + if (mEncoding != NULL) { + sprintf(mEncoding, "euc%s", p+1); + } + } else { + mEncoding = strdup(encoding); + } // set iconv environment if (mLocale)
Fixed in r3756.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.