[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Fwd: [Patch] Fix multibyte key string conversion problem in

  AbiWord 里面的 CJK 支援问题终于有解决了!
非常感谢 Yong LI <rigel863@yahoo.com> 大侠再次为大家解决问题。  :-)

  AbiSource 的 developer 已经把这个修正加入了,相信下一版的 AbiWord
不会再有这个问题。我稍后也会请 Debian developer Aaron Lehmann 加入这个
patch。  :-)


----- Forwarded message from Yong LI <rigel863@yahoo.com> -----

Date: Sun, 07 Oct 2001 23:42:44 -0700
From: Yong LI <rigel863@yahoo.com>
Subject: [Patch] Fix multibyte key string conversion problem in
To: patches@abisource.com
Cc: abiword-dev@abisource.com
Content-type: text/plain; charset=us-ascii; format=flowed

In the method ev_UnixKeyboard::keyPressEvent, a "UT_Mbtowc" object
is used to convert multibyte sequence to wchar. However the declaration
of this "UT_Mbtowc" object is placed inside the conversion loop, which
means for every byte to be converted a new "UT_Mbtowc" object is
constructed. This effectively disables the conversion of
multibyte-encoded characters which requires accumulation of multiple
bytes. One visible consequence of this problem is that input for all CJK
languages fail to work in

A patch is attached.


diff -u abi.orig/src/af/ev/unix/ev_UnixKeyboard.cpp 
--- abi.orig/src/af/ev/unix/ev_UnixKeyboard.cpp Mon Sep 10 09:53:44 2001
+++ abi/src/af/ev/unix/ev_UnixKeyboard.cpp  Sun Oct  7 15:04:38 2001
@@ -185,10 +185,10 @@
+               UT_Mbtowc m;
                ucs=new UT_UCSChar[mLength];
                for(int i=0;i<mLength;++i)
-                       UT_Mbtowc m;
                    wchar_t wc;

----- End forwarded message -----

Anthony Fok Tung-Ling  霍东灵
ThizLinux Laboratory   <anthony@thizlinux.com> http://www.thizlinux.com/
Debian Chinese Project <foka@debian.org>       http://www.debian.org/intl/zh/
Come visit Our Lady of Victory Camp!           http://www.olvc.ab.ca/

To UNSUBSCRIBE, email to debian-chinese-big5-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

| This message was re-posted from debian-chinese-big5@lists.debian.org
| and converted from big5 to gb2312 by an automatic gateway.

Reply to: