Paste number 6241: this xmls patch fixed generation in ACL

Index of paste annotations: 1 | 2

Paste number 6241: this xmls patch fixed generation in ACL
Pasted by: lemonodor
When:12 years, 3 months ago
Share:Tweet this! | http://paste.lisp.org/+4TD
Channel:#lisp
Paste contents:
Raw Source | XML | Display As
(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 1: well, that explains why some characters went missing
Pasted by: lemonodor
When:12 years, 3 months ago
Share:Tweet this! | http://paste.lisp.org/+4TD/1
Paste contents:
Raw Source | Display As
(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)))))

Annotation number 2: backtrace
Pasted by: tolstoy
When:12 years, 3 months ago
Share:Tweet this! | http://paste.lisp.org/+4TD/2
Paste contents:
Raw Source | Display As
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

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.