Bug#395141: konsole: additional patch related to #395141
Package: konsole
Version: 4:3.5.5a.dfsg.1-2
Followup-For: Bug #395141
Thanks for applying a patch.
But there is another problem.
Whiptail and dialog uses the characters like '0x2500' to draw UI. So,
we have to treat these characters as HALFWIDTH.
I wrote a patch to fix this problem. Please see the attachment.
Here's a screenshot when konsole treats '0x2500' as FULLWIDTH.
http://mars.shehas.net/~tmatsuo/bts/konsole-make_menuconfig.png
Attached patch fix this problem.
http://mars.shehas.net/~tmatsuo/bts/konsole-make_menuconfig-halfwidth.png
This patch affects only people who set the environment variable
KONSOLE_WCWIDTH_CJK too.
-- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-suspend2-2.2.8
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Versions of packages konsole depends on:
ii kdelibs4c2a 4:3.5.5a.dfsg.1-4 core libraries and binaries for al
ii libc6 2.3.6.ds1-8 GNU C Library: Shared libraries
ii libgcc1 1:4.1.1-20 GCC support library
ii libstdc++6 4.1.1-20 The GNU Standard C++ Library v3
ii libxrender1 1:0.9.1-3 X Rendering Extension client libra
ii libxtst6 1:1.0.1-5 X11 Testing -- Resource extension
konsole recommends no packages.
-- no debconf information
diff -uNr kdebase-3.5.5a.dfsg.1.orig/konsole/konsole/konsole_wcwidth.cpp kdebase-3.5.5a.dfsg.1/konsole/konsole/konsole_wcwidth.cpp
--- kdebase-3.5.5a.dfsg.1.orig/konsole/konsole/konsole_wcwidth.cpp 2006-11-18 19:21:12.000000000 +0900
+++ kdebase-3.5.5a.dfsg.1/konsole/konsole/konsole_wcwidth.cpp 2006-11-18 19:32:12.000000000 +0900
@@ -200,6 +200,46 @@
{ 0xE000, 0xF8FF }, { 0xFFFD, 0xFFFD }
};
+ static const Q_UINT16 dec_ruled_line[] = {
+ //0x25c6, /* diamond */
+ //0x2592, /* checkerboard */
+ //0x2409, /* HT symbol */
+ //0x240c, /* FF symbol */
+ //0x240d, /* CR symbol */
+ //0x240a, /* LF symbol */
+ //0x00b0, /* degree */
+ //0x00b1, /* plus/minus */
+ //0x2424, /* NL symbol */
+ //0x240b, /* VT symbol */
+ 0x2518, /* downright corner */
+ 0x2510, /* upright corner */
+ 0x250c, /* upleft corner */
+ 0x2514, /* downleft corner */
+ 0x253c, /* cross */
+ 0x23ba, /* scan line 1/9 */
+ 0x23bb, /* scan line 3/9 */
+ 0x2500, /* horizontal line (also scan line 5/9) */
+ 0x23bc, /* scan line 7/9 */
+ 0x23bd, /* scan line 9/9 */
+ 0x251c, /* left t */
+ 0x2524, /* right t */
+ 0x2534, /* bottom t */
+ 0x252c, /* top t */
+ 0x2502, /* vertical line */
+ //0x2264, /* <= */
+ //0x2265, /* >= */
+ //0x03c0, /* pi */
+ //0x2260, /* not equal */
+ //0x00a3, /* pound currency sign */
+ //0x00b7, /* bullet */
+ };
+
+ for (int i = 0; i < sizeof(dec_ruled_line) / sizeof(Q_UINT16); i++) {
+ if (ucs == dec_ruled_line[i]) {
+ return konsole_wcwidth_normal(ucs);
+ }
+ }
+
/* binary search in table of non-spacing characters */
if (bisearch(ucs, ambiguous,
sizeof(ambiguous) / sizeof(struct interval) - 1))
Reply to: