anchor.diff:             (type stream stream)
              (optimize (speed 3) (debug 0)))
     (loop
  -      for char across string
  -      for char-code = (char-code char) do
  -      (assert (<= char-code #16rffff))
  -      (cond ((and (< char-code 256)
  -                  (aref #.*uri-escaping-ok-table* char-code))
  -             (write-char char stream))
  -            ((< char-code 256)
  -             (format stream "%~2,'0X" char-code))
  -            (t
  -             (format stream "%u~4,'0X" char-code)))))
  -
  -(defun unescape-as-uri (string)
  -  (declare (inline))
  -  (%unescape-as-uri string nil))
  -
  -(defun nunescape-as-uri (string)
  -  (declare (inline))
  -  (%unescape-as-uri string t))
  +      for char-code :of-type (unsigned-byte 8) :across (the (vector (unsigned-byte 8))
  +                                                         (string-to-octets string :utf-8)) do
  +      (if (aref (the (simple-array boolean (256)) (load-time-value *uri-escaping-ok-table* t)) char-code)
  +          (write-char (code-char char-code) stream)
  +          (format stream "%~2,'0X" char-code))))
   
   (define-condition uri-parse-error (error)
     ((what :initarg :what :reader uri-parse-error.what)))
  
positive.code:   (loop
        ;; The list of characters which don't need to be escaped when writing URIs.
        for ok-char across "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.," do
        (setf (aref *uri-escaping-ok-table* (char-code ok-char)) t)))
  
  (defun escape-as-uri (string)
    "Escapes all non alphanumeric characters in STRING following
  
negative.code:                (parse ()
                   (let ((next-char (read-next-char nil)))
                     (case next-char
                       (#\% (char%))
                       ;;(#\+ (char+)) TODO what was this? delme eventually...
                       (t (write-next-byte (char-code next-char))))
                     (parse)))
                 (char% ()
                   (let* ((restart-input-index input-index)
                          (next-char (read-next-char t)))
                     (restart-case
                      (write-next-byte (+ (ash (char-to-int next-char) 4)
                                          (char-to-int (read-next-char t))))
                      (continue-as-is ()
                                      :report "Continue reading uri without attempting to convert the escaped-code to a char."
                                      (setf input-index restart-input-index)
                                      (write-next-byte #.(char-code #\%)))))
                   (values))
                 ;; TODO what was this? delme eventually...
                 #+nil(char+ ()
                        (write-next-char #\space)))
          (parse)))))
  
  (declaim (inline unescape-as-uri))
  (defun unescape-as-uri (string)
    (%unescape-as-uri string))
  
  (declaim (inline nunescape-as-uri))
  (defun nunescape-as-uri (string)
    (%unescape-as-uri string))
  
  
  
  ;;;; ** HTML
  
  