CVS update by aidan xemacs/tests/automated ...

xemacs-cvs at xemacs.org xemacs-cvs at xemacs.org
Thu Nov 23 08:43:29 EST 2006


  User: aidan   
  Date: 06/11/23 14:43:29

  Modified:    xemacs/tests/automated mule-tests.el
Log:
Handle bytes in the range 0x80-0xC0 better when dealing with ISO-IR 196.

Revision  Changes    Path
1.1017    +6 -0      XEmacs/xemacs/src/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.1016
retrieving revision 1.1017
diff -u -p -r1.1016 -r1.1017
--- ChangeLog	2006/11/22 02:20:31	1.1016
+++ ChangeLog	2006/11/23 13:43:17	1.1017
@@ -1,3 +1,9 @@
+2006-11-23  Aidan Kehoe  <kehoea at parhasard.net>
+
+	* mule-coding.c (iso2022_decode):
+	Only take the lower seven bits of any eight-bit character that
+	would be illegal in UTF-8, when handling ISO/IR 196 escapes. 
+
 2006-11-14  Stephen J. Turnbull  <stephen at xemacs.org>
 
 	* buffer.c (buffer-file-name): Document invariant.



1.39      +5 -2      XEmacs/xemacs/src/mule-coding.c

Index: mule-coding.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mule-coding.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -p -r1.38 -r1.39
--- mule-coding.c	2006/06/03 17:50:55	1.38
+++ mule-coding.c	2006/11/23 13:43:19	1.39
@@ -1949,8 +1949,11 @@ iso2022_decode (struct coding_stream *st
 		  counter = 1;
 		}
 	      else
-		/* ASCII, or the lower control characters. */
-		Dynarr_add (dst, c);
+		/* ASCII, or the lower control characters.
+                   
+                   Perhaps we should signal an error if the character is in
+                   the range 0x80-0xc0; this is illegal UTF-8. */
+                Dynarr_add (dst, (c & 0x7f));
 
 	      break;
 	    case 1:



1.85      +6 -0      XEmacs/xemacs/tests/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/tests/ChangeLog,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -p -r1.84 -r1.85
--- ChangeLog	2006/11/20 19:21:54	1.84
+++ ChangeLog	2006/11/23 13:43:27	1.85
@@ -1,3 +1,9 @@
+2006-11-23  Aidan Kehoe  <kehoea at parhasard.net>
+
+	* automated/mule-tests.el (featurep):
+	Add a test that ISO/IR 196 escape handling in ISO-2022-based
+	charsets don't choke on invalid bytes in UTF-8 text. 
+
 2006-11-20  Aidan Kehoe  <kehoea at parhasard.net>
 
 	* automated/mule-tests.el (featurep):



1.12      +6 -0      XEmacs/xemacs/tests/automated/mule-tests.el

Index: mule-tests.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/tests/automated/mule-tests.el,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- mule-tests.el	2006/11/20 19:21:56	1.11
+++ mule-tests.el	2006/11/23 13:43:29	1.12
@@ -441,6 +441,12 @@ This is a naive implementation in Lisp. 
                (eq (aref ccl-vector 4)  
                    (encode-char (make-char 'control-1 31) 'ucs)))))
 
+  ;; This used to crash, at least in debug builds:
+
+  (Assert (decode-coding-string 
+           (string ?\33 ?\45 ?\107 ?\306 ?\222 ?\215 ?\306)
+           'iso-2022-jp))
+
   ;;---------------------------------------------------------------
   ;; Test charset-in-* functions
   ;;---------------------------------------------------------------





More information about the XEmacs-CVS mailing list