fix bad encoding in reference manual

svn: r9965
This commit is contained in:
Matthew Flatt 2008-05-26 21:11:20 +00:00
parent 44a8c8b6b1
commit cde865b571
3 changed files with 8 additions and 7 deletions

View File

@ -42,9 +42,10 @@
(define-code SCHEMEBLOCK (to-paragraph/prefix (hspace 2) (hspace 2) "")
UNSYNTAX)
(define-code SCHEMEBLOCK0 to-paragraph UNSYNTAX)
(define interaction-prompt (make-element 'tt (list "> " )))
(define-code schemeinput
(to-paragraph/prefix
(make-element #f (list (hspace 2) (make-element 'tt (list "> " ))))
(make-element #f (list (hspace 2) interaction-prompt))
(hspace 4)
""))

View File

@ -354,7 +354,7 @@ Certain encoding combinations are always available:
@index['("UTF-8-permissive")]{the} identity conversion, except that
any input byte that is not part of a valid encoding sequence is
effectively replaced by the UTF-8 encoding sequence for
@scheme[#\uFFFD]. (This handling of invalid sequences is
@schemevalfont{#\uFFFD}. (This handling of invalid sequences is
consistent with the interpretation of port bytes streams into
characters; see @secref["ports"].)}

View File

@ -17,14 +17,14 @@ stream to discover that the stream is not a valid encoding.
When an input port produces a sequence of bytes that is not a valid
UTF-8 encoding in a character-reading context, then bytes that
constitute an invalid sequence are converted to the character
@scheme[#\uFFFD]. Specifically, bytes 255 and 254 are always converted
to @scheme[#\uFFFD], bytes in the range 192 to 253 produce
@scheme[#\uFFFD] when they are not followed by bytes that form a valid
@schemevalfont{#\uFFFD}. Specifically, bytes 255 and 254 are always converted
to @schemevalfont{#\uFFFD}, bytes in the range 192 to 253 produce
@schemevalfont{#\uFFFD} when they are not followed by bytes that form a valid
UTF-8 encoding, and bytes in the range 128 to 191 are converted to
@scheme[#\uFFFD] when they are not part of a valid encoding that was
@schemevalfont{#\uFFFD} when they are not part of a valid encoding that was
started by a preceding byte in the range 192 to 253. To put it another
way, when reading a sequence of bytes as characters, a minimal set of
bytes are changed to the encoding of @scheme[#\uFFFD] so that the
bytes are changed to the encoding of @schemevalfont{#\uFFFD} so that the
entire sequence of bytes is a valid UTF-8 encoding.
See @secref["bytestrings"] for procedures that facilitate