Remove duplicate implementations of (setf aref/sbit/bit).
[sbcl.git] / src / code / external-formats / enc-basic.lisp
index 9ae5271..0deb08a 100644 (file)
 (instantiate-octets-definition define-utf8->string)
 
 (define-external-format/variable-width (:utf-8 :utf8) t
+  #!+sb-unicode (code-char #xfffd) #!-sb-unicode #\?
   (let ((bits (char-code byte)))
     (cond ((< bits #x80) 1)
           ((< bits #x800) 2)
              (sap-ref-8 sap (+ 1 tail)) (logior #x80 (ldb (byte 6 12) bits))
              (sap-ref-8 sap (+ 2 tail)) (logior #x80 (ldb (byte 6 6) bits))
              (sap-ref-8 sap (+ 3 tail)) (logior #x80 (ldb (byte 6 0) bits)))))
-  (cond ((< byte #x80) 1)
-        ((< byte #xc2) (return-from decode-break-reason 1))
-        ((< byte #xe0) 2)
-        ((< byte #xf0) 3)
-        (t 4))
+  (1 (cond ((< byte #x80) 1)
+           ((< byte #xc2) (return-from decode-break-reason 1))
+           ((< byte #xe0) 2)
+           ((< byte #xf0) 3)
+           (t 4)))
   (code-char (ecase size
                (1 byte)
                (2 (let ((byte2 (sap-ref-8 sap (1+ head))))