*** empty log message ***
authorroot <root>
Sat, 26 Apr 2008 03:37:18 +0000 (03:37 +0000)
committerroot <root>
Sat, 26 Apr 2008 03:37:18 +0000 (03:37 +0000)
Changes
src/command.C
src/misc.C

diff --git a/Changes b/Changes
index 28b8571..6b1bf94 100644 (file)
--- a/Changes
+++ b/Changes
@@ -25,11 +25,15 @@ TODO: rxvt -font 10x20 -xrm "*.tabbed.font: 10x20" -pe tabbed
       how does one affect the tab windows themselves? seems not to work anymore.
 
 TODO: memory leak for((i=0;i<1000;++o)); do rxvtc -g 1x1 -e exit;done
+TODO: implement initial chdir for tabs by making it a resource?
+       - correctly reset the multibyte state to the initial one
+          after EILSEQ (patch by Neil Booth). This fixes the
+          issue of rxvt-unicode not properly displaying text after an illegal
+          sequence on NetBSD and probably other systems.
        - made tabs moveable (based on a patch by Petr Machata).
         - support relative paths for RXVT_SOCKET in urxvtd.
         - better diagnostic on 0x0 window geometries.
-       
-TODO: implement initial chdir for tabs by making it a resource?
+
 9.02 Tue Jan 29 11:58:36 CET 2008
        - the "exg makes everybody happy" release.
        - fix build with !xft.
index 475fb02..f41df70 100644 (file)
@@ -2326,7 +2326,10 @@ rxvt_term::next_char () NOTHROW
         }
 
       if (len == (size_t)-1)
-        return (unsigned char)*cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through
+        {
+          mbrtowc (0, 0, 0, mbstate); // reset now undefined conversion state
+          return (unsigned char)*cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through
+        }
 
       // assume wchar == unicode
       cmdbuf_ptr += len;
index d589b89..c55c543 100644 (file)
@@ -40,7 +40,10 @@ rxvt_wcstombs (const wchar_t *str, int len)
       ssize_t l = wcrtomb (dst, *str++, mbs);
 
       if (l < 0)
-        *dst++ = '?';
+        {
+          *dst++ = '?';
+          wcrtomb (0, 0, mbs); // reset undefined state
+        }
       else
         dst += l;
     }