projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.41.35: ppc: Implement compare-and-swap-vops.
[sbcl.git]
/
src
/
code
/
external-formats
/
mb-util.lisp
diff --git
a/src/code/external-formats/mb-util.lisp
b/src/code/external-formats/mb-util.lisp
index
c76bc42
..
9a82d45
100644
(file)
--- a/
src/code/external-formats/mb-util.lisp
+++ b/
src/code/external-formats/mb-util.lisp
@@
-248,6
+248,12
@@
;; for fd-stream.lisp
(define-external-format/variable-width ,aliases t
;; for fd-stream.lisp
(define-external-format/variable-width ,aliases t
+ ;; KLUDGE: it so happens that at present (2009-10-22) none of
+ ;; the external formats defined with
+ ;; define-multibyte-encoding can encode the unicode
+ ;; replacement character, so we hardcode the preferred
+ ;; replacement here.
+ #\?
(mb-char-len (or (,ucs-to-mb (char-code byte)) -1))
(let ((mb (,ucs-to-mb bits)))
(if (null mb)
(mb-char-len (or (,ucs-to-mb (char-code byte)) -1))
(let ((mb (,ucs-to-mb bits)))
(if (null mb)
@@
-259,7
+265,7
@@
(3 (setf (sap-ref-8 sap tail) (ldb (byte 8 16) mb)
(sap-ref-8 sap (1+ tail)) (ldb (byte 8 8) mb)
(sap-ref-8 sap (+ 2 tail)) (ldb (byte 8 0) mb))))))
(3 (setf (sap-ref-8 sap tail) (ldb (byte 8 16) mb)
(sap-ref-8 sap (1+ tail)) (ldb (byte 8 8) mb)
(sap-ref-8 sap (+ 2 tail)) (ldb (byte 8 0) mb))))))
- (,mb-len byte)
+ (1 (,mb-len byte))
(let* ((mb (ecase size
(1 byte)
(2 (let ((byte2 (sap-ref-8 sap (1+ head))))
(let* ((mb (ecase size
(1 byte)
(2 (let ((byte2 (sap-ref-8 sap (1+ head))))