Package: libncurses5
Version: 5.4-4
Severity: normal
Tags: patch

I found this problem when I was reading a letter from a traditional
Chinese user with mutt, which is built with ncursesw 5.4. Most
traditional Chinese characters is unreadable. 

The upstream author has made a patch[1] for this. I've also include it
as attachment.

please see the bugs-ncurses archive[2] for more information.

[1] http://lists.gnu.org/archive/html/bug-ncurses/2005-03/msg00036.html
[2] http://lists.gnu.org/archive/html/bug-ncurses/2005-03/msg00030.html

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.11-rc4
Locale: LANG=zh_CN.GBK, LC_CTYPE=zh_CN.GBK (charmap=GBK) (ignored: LC_ALL set 
to zh_CN.GBK)

Versions of packages libncurses5 depends on:
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an

-- no debconf information

-- 
WANG WenRui <[EMAIL PROTECTED]>
PGP-Key-ID: 6ABE5DE0
Registered GNU/Linux User #278717
WWW: http://gnor.net/~roger/
--- ncurses-5.4/ncurses/base/lib_addch.c        2004-02-08 02:20:46.000000000 
+0800
+++ ncurses-5.4-new/ncurses/base/lib_addch.c    2005-03-21 01:09:01.000000000 
+0800
@@ -267,16 +376,22 @@
      * Otherwise, if unctrl() returns a single-character or the locale
      * claims the code is printable, treat it that way.
      */
-    if ((AttrOf(ch) & A_ALTCHARSET)
-       || ((s = unctrl(t))[1] == 0 ||
-               (
-               isprint(t)
-#if USE_WIDEC_SUPPORT
-               || WINDOW_EXT(win, addch_used)
-#endif
-               )))
-       return waddch_literal(win, ch);
-
+    if ((AttrOf(ch) & A_ALTCHARSET)                                            
 
+        || ((
+#if USE_WIDEC_SUPPORT                                                          
 
+                               (SP != 0 && SP->_legacy_coding) && 
+#endif                                                                         
 
+                               (s = unctrl(t))[1] == 0)                        
             
+        )                                                                      
 
+        || (                                                                   
 
+                isprint(t)                                                     
 
+#if USE_WIDEC_SUPPORT                                                          
 
+                || WINDOW_EXT(win, addch_used)                                 
 
+                || !_nc_is_charable(CharOf(ch))                                
 
+#endif                                                                         
 
+            ))                                                                 
 
+        return waddch_literal(win, ch);                                        
 
+                                                             
     /*
      * Handle carriage control and other codes that are not printable, or are
      * known to expand to more than one character according to unctrl().

Reply via email to