| Paste number 6241: | this xmls patch fixed generation in ACL |
| Pasted by: | lemonodor |
| When: | 4 years, 4 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+4TD |
| Channel: | #lisp |
| Paste contents: |
(defun xmls::write-escaped (string stream)
"Writes string to stream with all character entities escaped."
(coerce string 'string)
(when (eq stream t) (setf stream *standard-output*))
(dotimes (i (length string))
(let* ((char (char string i))
(code (char-code char)))
(if (> code 255)
(format nil "&#~S;" code)
(write-sequence (svref xmls::*char-escapes* code) stream)))))
Annotations for this paste:
| Annotation number 2: | backtrace |
| Pasted by: | tolstoy |
| When: | 4 years, 4 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+4TD#2 |
| Paste contents: |
The value #\â is not of type BASE-CHAR.
[Condition of type TYPE-ERROR]
Restarts:
0: [ABORT] Abort handling SLIME request.
1: [ABORT] Reduce debugger level (leaving debugger, returning to toplevel).
2: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop.
Backtrace:
0: (SB-KERNEL:HAIRY-DATA-VECTOR-SET 3 "<p>
As <a href=\"http://lemonodor.com/archives/001077.html\">seen on Lemonodor</a>...
<blockquote>
<em>
The book <a href=\"http://www.amazon.com/exec/obidos/ASIN/1590592395/qid=1109294066/sr=2-1/ref=pd_ka_b_2_1/103-3914066-2665435\">Practical Common Lisp</a> shows the power of Lisp not only in the areas that it has traditionally been noted for| Annotation number 1: | well, that explains why some characters went missing |
| Pasted by: | lemonodor |
| When: | 4 years, 4 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+4TD#1 |
| Paste contents: |
(defun xmls::write-escaped (string stream)
"Writes string to stream with all character entities escaped."
(coerce string 'string)
(when (eq stream t) (setf stream *standard-output*))
(dotimes (i (length string))
(let* ((char (char string i))
(code (char-code char)))
(if (> code 255)
;; OOPS
(format stream "&#~S;" code)
(write-sequence (svref xmls::*char-escapes* code) stream)))))