From cde865b571717368478f48a9cb965f66af867ea8 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 26 May 2008 21:11:20 +0000 Subject: [PATCH] fix bad encoding in reference manual svn: r9965 --- collects/scribble/manual.ss | 3 ++- collects/scribblings/reference/bytes.scrbl | 2 +- collects/scribblings/reference/encodings.scrbl | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/collects/scribble/manual.ss b/collects/scribble/manual.ss index 22d95211a1..0a2468a416 100644 --- a/collects/scribble/manual.ss +++ b/collects/scribble/manual.ss @@ -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) "")) diff --git a/collects/scribblings/reference/bytes.scrbl b/collects/scribblings/reference/bytes.scrbl index 6ecbba4f29..7d46b13c22 100644 --- a/collects/scribblings/reference/bytes.scrbl +++ b/collects/scribblings/reference/bytes.scrbl @@ -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"].)} diff --git a/collects/scribblings/reference/encodings.scrbl b/collects/scribblings/reference/encodings.scrbl index 842fa77298..2bb6c9067c 100644 --- a/collects/scribblings/reference/encodings.scrbl +++ b/collects/scribblings/reference/encodings.scrbl @@ -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