diff --git a/encoding.bs b/encoding.bs index 684c72d..d968b65 100644 --- a/encoding.bs +++ b/encoding.bs @@ -129,7 +129,7 @@ present in I/O queues of any type and it signifies that there are n

To read an item from an -I/O queue ioQueue, run these steps: +I/O queue ioQueue:

  1. If ioQueue is empty, then wait until its size is @@ -143,7 +143,7 @@ present in I/O queues of any type and it signifies that there are n

    To read a number number of items from -ioQueue, run these steps: +ioQueue:

    1. Let readItems be « ». @@ -165,7 +165,7 @@ present in I/O queues of any type and it signifies that there are n

      To peek a number number of items -from an I/O queue ioQueue, run these steps: +from an I/O queue ioQueue:

      1. Wait until either ioQueue's size is equal to or greater than @@ -175,7 +175,8 @@ from an I/O queue ioQueue, run these steps:

      2. Let prefix be « ».

      3. -

        For each n in the range 1 to number, inclusive: +

        For each n in the range 0 to + number, exclusive:

        1. If ioQueue[n] is end-of-queue, break. @@ -190,7 +191,7 @@ from an I/O queue ioQueue, run these steps:

          To push an item -item to an I/O queue ioQueue, run these steps: +item to an I/O queue ioQueue:

          1. @@ -234,7 +235,7 @@ items, in the given order, before the first item in the queue.

            To convert a list, string, or -byte sequence input into an I/O queue, run these steps: +byte sequence input into an I/O queue:

            1. Assert: input is not a list or it does not @@ -426,7 +427,7 @@ as "utf-8".

              To get an encoding -from a string label, run these steps: +from a string label:

              1. Remove any leading and trailing ASCII whitespace from @@ -816,7 +817,7 @@ plans to remove these.

                Output encodings

                To get an output encoding from an encoding -encoding, run these steps: +encoding:

                1. If encoding is replacement or UTF-16BE/LE, then return @@ -1081,7 +1082,7 @@ different format here, to be able to represent ranges.)

                  To UTF-8 decode an I/O queue of bytes ioQueue given an optional I/O -queue of scalar values output (default « »), run these steps: +queue of scalar values output (default « »):

                  1. Let buffer be the result of peeking three bytes from @@ -1099,7 +1100,7 @@ queue of scalar values output (default « »), run these steps:

                    To UTF-8 decode without BOM an I/O queue of bytes ioQueue given an -optional I/O queue of scalar values output (default « »), run these steps: +optional I/O queue of scalar values output (default « »):

                    1. Process a queue with an instance of UTF-8's decoder, @@ -1111,7 +1112,7 @@ optional I/O queue of scalar values output (default « »), run these

                      To UTF-8 decode without BOM or fail an I/O queue of bytes ioQueue -given an optional I/O queue of scalar values output (default « »), run these steps: +given an optional I/O queue of scalar values output (default « »): @@ -1152,8 +1153,7 @@ optional I/O queue of bytes output (default « »), return the result

                      To decode an I/O queue of bytes ioQueue given a fallback encoding -encoding and an optional I/O queue of scalar values output (default « »), run -these steps: +encoding and an optional I/O queue of scalar values output (default « »):

                      1. Let BOMEncoding be the result of BOM sniffing ioQueue. @@ -1180,7 +1180,7 @@ these steps:

                      -

                      To BOM sniff an I/O queue of bytes ioQueue, run these steps: +

                      To BOM sniff an I/O queue of bytes ioQueue:

                      1. Let BOM be the result of peeking 3 bytes from @@ -1210,8 +1210,7 @@ corresponding to the byte order mark found, or null otherwise.

                        To encode an I/O queue of scalar values ioQueue given an encoding -encoding and an optional I/O queue of bytes output (default « »), run these -steps: +encoding and an optional I/O queue of bytes output (default « »):

                        1. Let encoder be the result of getting an encoder from encoding. @@ -1241,8 +1240,7 @@ is safe as it never triggers errors. [[HTML]]

                          To encode or fail an I/O queue of scalar values ioQueue given an -encoder instance encoder and an I/O queue of bytes output, run -these steps: +encoder instance encoder and an I/O queue of bytes output:

                          1. Let potentialError be the result of processing a queue with @@ -1863,7 +1861,7 @@ constructor steps are:

                            To set up a text decoder stream given a {{TextDecoderStream}} object stream, an optional [=/encoding=] encoding (default UTF-8), an optional error mode errorMode (default "replacement"), and an optional -boolean ignoreBOM (default false), run these steps: +boolean ignoreBOM (default false):

                            1. Assert: encoding is not replacement.