]> granicus.if.org Git - neomutt/commitdiff
patch-1.3.23.2.tt.wcwidth_ja.1. Fix wcwidth_ja(), from Takizawa
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 26 Nov 2001 19:12:29 +0000 (19:12 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 26 Nov 2001 19:12:29 +0000 (19:12 +0000)
Takashi <taki@luna.email.ne.jp>.

PATCHES
mbyte.c

diff --git a/PATCHES b/PATCHES
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2348cba757c6dbd0a41abc834bf985637806cb73 100644 (file)
--- a/PATCHES
+++ b/PATCHES
@@ -0,0 +1 @@
+<patch-1.3.23.2.tt.wcwidth_ja.1>
diff --git a/mbyte.c b/mbyte.c
index 8bf22106ac452738aa6ab69443de9858f9b5a8d1..8c71aea9c6a05b6a5ec3ebc9e07c47a25e6befa5 100644 (file)
--- a/mbyte.c
+++ b/mbyte.c
@@ -17,7 +17,7 @@
  */
 
 /*
- * Japanese support by TAKIZAWA Takashi.
+ * Japanese support by TAKIZAWA Takashi <taki@luna.email.ne.jp>.
  */
 
 #include "mutt.h"
@@ -332,12 +332,13 @@ int iswalnum (wint_t wc)
  */
 int wcwidth_ja (wchar_t ucs)
 {
-  if (ucs >= 2e80)
+  if (ucs >= 0x3021)
     return -1; /* continue with the normal check */
   /* a rough range for quick check */
   if ((ucs >= 0x00a1 && ucs <= 0x00fe) || /* Latin-1 Supplement */
       (ucs >= 0x0391 && ucs <= 0x0451) || /* Greek and Cyrillic */
-      (ucs >= 0x2010 && ucs <= 0x266f))   /* Symbols */
+      (ucs >= 0x2010 && ucs <= 0x266f) || /* Symbols */
+      (ucs >= 0x3000 && ucs <= 0x3020))   /* CJK Symbols and Punctuation */
     return 2;
   else
     return -1;