Current-Users archive

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

Re: vi international character display



ok, i found a bug in dist/nvi/common/key.h

INTISWIDE() macro treat 0x80-0xFFas singlebyte character, so that
none-ascii character
such as Japanese character works fine, but West European accented
characters not.

please try following patch:

Index: common/key.h
===================================================================
RCS file: /cvsroot/src/dist/nvi/common/key.h,v
retrieving revision 1.2
diff -u -r1.2 key.h
--- common/key.h        21 Mar 2011 14:53:02 -0000      1.2
+++ common/key.h        13 Nov 2011 18:13:23 -0000
@@ -28,7 +28,7 @@
     sp->conv.input2int(sp, n, nlen, &(cw), &wlen, &w)
 #define CONST
 #define CHAR_WIDTH(sp, ch)  wcwidth(ch)
-#define INTISWIDE(c)   (!!(c >> 8))        /* XXX wrong name */
+#define INTISWIDE(c)   (!!(c >> 7))        /* XXX wrong name */
 #else
 #define FILE2INT5(sp,buf,n,nlen,w,wlen) \
     (w = n, wlen = nlen, 0)


very truly yours.
-- 
Takehiko NOZAKI<tnozaki%NetBSD.org@localhost>


Home | Main Index | Thread Index | Old Index