CMUCL commit: src/pcl/simple-streams/external-formats (utf-8.lisp)

Raymond Toy rtoy at common-lisp.net
Tue Jul 6 06:46:35 CEST 2010


    Date: Tuesday, July 6, 2010 @ 00:46:35
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats

Modified: utf-8.lisp

Fix the check for overlong sequences.  The constants appear to be
wrong.

Some overlong sequences:

c0 af
e0 80 af
f0 80 80 af

e0 9f bf
f0 8f bf bf

e0 80 80
f0 80 80 80


------------+
 utf-8.lisp |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


Index: src/pcl/simple-streams/external-formats/utf-8.lisp
diff -u src/pcl/simple-streams/external-formats/utf-8.lisp:1.10 src/pcl/simple-streams/external-formats/utf-8.lisp:1.11
--- src/pcl/simple-streams/external-formats/utf-8.lisp:1.10	Mon Jul  5 00:12:47 2010
+++ src/pcl/simple-streams/external-formats/utf-8.lisp	Tue Jul  6 00:46:35 2010
@@ -4,7 +4,7 @@
 ;;; This code was written by Paul Foley and has been placed in the public
 ;;; domain.
 ;;;
-(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-8.lisp,v 1.10 2010-07-05 04:12:47 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-8.lisp,v 1.11 2010-07-06 04:46:35 rtoy Exp $")
 
 (in-package "STREAM")
 
@@ -48,8 +48,8 @@
 		;; sequence) and any surrogate values and any code
 		;; outside the 21-bit Unicode range.
 		(if (or (>= ,n lisp:codepoint-limit)
-			(<= ,n (the (member 127 1023 32767)
-				 (svref #(127 1023 32767) (1- ,i)))) ; overlong
+			(<= ,n (the (member 127 2047 65535)
+				 (svref #(127 2047 65535) (1- ,i)))) ; overlong
 			(lisp::surrogatep ,n)) ; surrogate
 		    (progn
 		      (,unput ,i)



More information about the cmucl-commit mailing list