anchor.diff:                  (read-buffer-offset stream) 0)
             t)))))
   
  -(defmethod sys.gray:stream-read-byte ((stream simple-file-stream))
  -  (assert (member (direction stream) '(:input :io)))
  +(defun remote-read-byte (stream)
     (if (refill-read-buffer stream)
         ;; Data available
         (prog1 (aref (read-buffer stream) (read-buffer-offset stream))
  
positive.code:        for byte across encoded
         do (sys.gray:stream-write-byte stream byte))))
  
  ;;; Explicitly fall back on the generic function so the byte read-sequence function
  ;;; doesn't get called.
  (defmethod sys.gray:stream-read-sequence ((stream simple-file-character-stream) sequence start end)
    (if (stringp sequence)
        (sys.int::generic-read-sequence sequence stream start end)
        (call-next-method)))
  
  (defmethod sys.gray:stream-read-char ((stream simple-file-character-stream))
    (let ((leader (read-byte stream nil)))
      (unless leader
        (return-from sys.gray:stream-read-char :eof))
      (when (eql leader #x0D)
        (read-byte stream nil)
        (setf leader #x0A))
      (multiple-value-bind (length code-point)
          (sys.net::utf-8-decode-leader leader)
        (when (null length)
          (return-from sys.gray:stream-read-char
            (code-char #xFFFE)))
        (dotimes (i length)
          (let ((byte (read-byte stream nil)))
            (when (or (null byte)
                      (/= (ldb (byte 2 6) byte) #b10))
              (return-from sys.gray:stream-read-char
                (code-char #xFFFE)))
            (setf code-point (logior (ash code-point 6)
                                     (ldb (byte 6 0) byte)))))
        (if (or (> code-point #x0010FFFF)
                (<= #xD800 code-point #xDFFF))
            (code-char #xFFFE)
            (code-char code-point)))))
  
  (defmethod sys.gray:stream-file-position ((stream simple-file-stream) &optional (position-spec nil position-specp))
    (cond (position-specp
  
negative.code:       ;; End of file
        :eof))
  
  (defmethod sys.gray:stream-read-byte ((stream simple-file-stream))
    (assert (member (direction stream) '(:input :io)))
    (remote-read-byte stream))
  
  (defmethod sys.gray:stream-read-sequence ((stream simple-file-stream) sequence &optional (start 0) end)
    (assert (member (direction stream) '(:input :io)))
    (unless end (setf end (length sequence)))
    (let ((bytes-read 0)
          (offset start)
  