anchor.diff:    (check-type vector (vector (unsigned-byte 8)))
     (with-checked-simple-vector ((vector vector) (start start) (end end))
       (declare (type (simple-array (unsigned-byte 8) (*)) vector))
  -    (let ((mapping (lookup-string-vector-mapping encoding))
  +    (let ((mapping (lookup-mapping *string-vector-mappings* encoding))
             (*suppress-character-coding-errors* (not errorp)))
         (when maxp (assert (plusp max)))
         (funcall (code-point-counter mapping) vector start end max))))
  
positive.code:   (with-checked-simple-vector ((vector vector) (start start) (end end))
      (declare (type (simple-array (unsigned-byte 8) (*)) vector))
      (let ((*suppress-character-coding-errors* (not errorp))
            (mapping (lookup-string-vector-mapping encoding)))
        (multiple-value-bind (size new-end)
            (funcall (code-point-counter mapping) vector start end -1)
          ;; TODO we could optimize ASCII here: the result should
  
negative.code:   (with-checked-simple-vector ((string (coerce string 'unicode-string))
                                 (start start) (end end))
      (declare (type simple-unicode-string string))
      (let ((mapping (lookup-mapping *string-vector-mappings* encoding))
            (*suppress-character-coding-errors* (not errorp)))
        (when maxp (assert (plusp max)))
        (funcall (octet-counter mapping) string start end max))))
  