[Uim-bugs] [Bug 7558] New: if uim-xim gets "EUC" by XIM_ENCODING_NEGOTIATION, it sends no XIM_COMMIT

bugzilla-daemon at annarchy.freedesktop.org bugzilla-daemon at annarchy.freedesktop.org
Tue Jul 18 15:38:20 EEST 2006


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=7558          
     
           Summary: if uim-xim gets "EUC" by XIM_ENCODING_NEGOTIATION, it
                    sends no XIM_COMMIT
           Product: UIM
           Version: unspecified
          Platform: PC
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: bridge: XIM
        AssignedTo: uim-bugs at freedesktop.org
        ReportedBy: deton at m1.interq.or.jp


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)          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the uim-bugs mailing list