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:   (handler-bind ((expected-digit-uri-parse-error #'continue-as-is))
      (unescape-as-uri string)))
  
  (defun %unescape-as-uri (input may-modify-input-p)
    (declare (type string input)
             (optimize (speed 3) (debug 0)))
    (let ((input-length (length input)))
      (when (zerop input-length)
        (return-from %unescape-as-uri ""))
      (let* ((input-index 0)
             (output (if (and may-modify-input-p
                              (adjustable-array-p input))
                         input
                         (make-array input-length :element-type 'character :adjustable t)))
             (output-index 0))
        (declare (type fixnum input-length input-index output-index))
        (labels ((read-next-char (must-exists-p)
                   (when (>= input-index input-length)
                     (if must-exists-p
                         (error 'uri-parse-error :what input)
                         (return-from %unescape-as-uri (adjust-array output output-index))))
                   (prog1 (aref input input-index)
                     (incf input-index)))
                 (write-next-char (char)
                   (setf (aref output output-index) char)
                   (incf output-index))
                 (char-to-int (char)
                   (let ((result (digit-char-p char 16)))
                     (unless result
  
negative.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))
    (setf *uri-escaping-ok-table* (coerce *uri-escaping-ok-table* '(simple-array boolean (256)))))
  
  (defun escape-as-uri (string)
    "Escapes all non alphanumeric characters in STRING following
  