Skip to content
Snippets Groups Projects
Commit 216a9cfe authored by rtoy's avatar rtoy
Browse files

Fix handling of the byte-order mark. The state was not getting set

properly.  (Broken in previous change for fast streams.)
parent 46080fa5
Branches
Tags
No related merge requests found
;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*- ;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*-
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/utf-16.lisp,v 1.5 2009/10/18 14:21:24 rtoy Exp $") (ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/utf-16.lisp,v 1.6 2010/01/22 23:57:29 rtoy Exp $")
(in-package "STREAM") (in-package "STREAM")
...@@ -78,9 +78,9 @@ ...@@ -78,9 +78,9 @@
,wd 4) ,wd 4)
(setf ,code +replacement-character-code+)))) (setf ,code +replacement-character-code+))))
((and (= ,code #xFFFE) (zerop ,st)) ((and (= ,code #xFFFE) (zerop ,st))
(setf ,state 1) (go :again)) (setf (car ,state) 1) (go :again))
((and (= ,code #xFEFF) (zerop ,st)) ((and (= ,code #xFEFF) (zerop ,st))
(setf ,state 2) (go :again)) (setf (car ,state) 2) (go :again))
((= ,code #xFFFE) ((= ,code #xFFFE)
;; Replace with REPLACEMENT CHARACTER. ;; Replace with REPLACEMENT CHARACTER.
(setf ,code +replacement-character-code+))) (setf ,code +replacement-character-code+)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment