rev 4921 - in trunk/packages/kdebase/debian: . patches
Christopher Martin
chrsmrtn at alioth.debian.org
Thu Nov 16 22:45:39 UTC 2006
Author: chrsmrtn
Date: 2006-11-16 23:45:39 +0100 (Thu, 16 Nov 2006)
New Revision: 4921
Added:
trunk/packages/kdebase/debian/patches/34_japanese_konsole_fix.diff
Modified:
trunk/packages/kdebase/debian/changelog
Log:
Add konsole patch (thanks for the reminder).
Modified: trunk/packages/kdebase/debian/changelog
===================================================================
--- trunk/packages/kdebase/debian/changelog 2006-11-16 22:19:03 UTC (rev 4920)
+++ trunk/packages/kdebase/debian/changelog 2006-11-16 22:45:39 UTC (rev 4921)
@@ -12,6 +12,12 @@
* Fix a typo in konsole manpage and extend the description about -e a bit.
Inspired by xterm man page.
+ +++ Changes by Christopher Martin:
+
+ * Add a patch from the upstream bug report (http://bugs.kde.org/41744) that
+ fixes the display of Japanese fullwidth characters in Konsole.
+ (Closes: #395141)
+
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Thu, 16 Nov 2006 17:08:46 -0500
kdebase (4:3.5.5a.dfsg.1-1) unstable; urgency=medium
Added: trunk/packages/kdebase/debian/patches/34_japanese_konsole_fix.diff
===================================================================
--- trunk/packages/kdebase/debian/patches/34_japanese_konsole_fix.diff 2006-11-16 22:19:03 UTC (rev 4920)
+++ trunk/packages/kdebase/debian/patches/34_japanese_konsole_fix.diff 2006-11-16 22:45:39 UTC (rev 4921)
@@ -0,0 +1,79 @@
+--- kde.orig/konsole/konsole/konsole_wcwidth.cpp
++++ kde.patched/konsole/konsole/konsole_wcwidth.cpp
+@@ -9,6 +9,10 @@
+
+ #include "konsole_wcwidth.h"
+
++#include <stdlib.h> // for getenv()
++
++
++
+ struct interval {
+ unsigned short first;
+ unsigned short last;
+@@ -65,7 +69,7 @@ static int bisearch(Q_UINT16 ucs, const
+ * in ISO 10646.
+ */
+
+-int konsole_wcwidth(Q_UINT16 ucs)
++int konsole_wcwidth_normal(Q_UINT16 ucs)
+ {
+ /* sorted list of non-overlapping intervals of non-spacing characters */
+ static const struct interval combining[] = {
+@@ -131,7 +135,6 @@ int konsole_wcwidth(Q_UINT16 ucs)
+ (ucs >= 0x20000 && ucs <= 0x2ffff) */));
+ }
+
+-#if 0
+ /*
+ * The following function is the same as konsole_wcwidth(), except that
+ * spacing characters in the East Asian Ambiguous (A) category as
+@@ -202,15 +205,31 @@ int konsole_wcwidth_cjk(Q_UINT16 ucs)
+ sizeof(ambiguous) / sizeof(struct interval) - 1))
+ return 2;
+
+- return konsole_wcwidth(ucs);
++ return konsole_wcwidth_normal(ucs);
+ }
+-#endif
+
+ // single byte char: +1, multi byte char: +2
+ int string_width( const QString &txt )
+ {
+ int w = 0;
+- for ( uint i = 0; i < txt.length(); ++i )
+- w += konsole_wcwidth( txt[ i ].unicode() );
++
++ for ( uint i = 1; i < txt.length(); ++i ) {
++ w += konsole_wcwidth(txt[i].unicode());
++ }
+ return w;
+ }
++
++
++int konsole_wcwidth(Q_UINT16 ucs) {
++
++ static int use_wcwidth_cjk = (getenv("KONSOLE_WCWIDTH_CJK")) ? 1: 0;
++
++ if (use_wcwidth_cjk) {
++ return konsole_wcwidth_cjk(ucs);
++ } else {
++ return konsole_wcwidth_normal(ucs);
++ }
++
++}
++
++
+--- kde.orig/konsole/konsole/konsole_wcwidth.h
++++ kde.patched/konsole/konsole/konsole_wcwidth.h
+@@ -10,9 +10,7 @@
+ #include <qstring.h>
+
+ int konsole_wcwidth(Q_UINT16 ucs);
+-#if 0
+-int konsole_wcwidth_cjk(Q_UINT16 ucs);
+-#endif
++//int konsole_wcwidth_cjk(Q_UINT16 ucs);
+
+ int string_width( const QString &txt );
+
More information about the pkg-kde-commits
mailing list