<p>Trivial UTF-8 is a small library for doing UTF-8-based in- and
output on a Lisp implementation that already supports Unicode -
meaning <code>CHAR-CODE</code> and <code>CODE-CHAR</code> deal with Unicode character codes.</p>
meaning <ahref="http://www.lispworks.com/documentation/HyperSpec/Body/f_char_c.htm"title="(CHAR-CODE FUNCTION)"><code>CHAR-CODE</code></a> and <ahref="http://www.lispworks.com/documentation/HyperSpec/Body/f_code_c.htm"title="(CODE-CHAR FUNCTION)"><code>CODE-CHAR</code></a> deal with Unicode character codes.</p>
<p>The rationale for the existence of this library is that while
Unicode-enabled implementations usually do provide some kind of
<p>Determine the amount of bytes that are part of the character whose
encoding starts with <code>BYTE</code>. May signal <ahref="#x-28TRIVIAL-UTF-8-3AUTF-8-DECODING-ERROR-20CONDITION-29"title="(TRIVIAL-UTF-8:UTF-8-DECODING-ERROR CONDITION)"><code>UTF-8-DECODING-ERROR</code></a>.</p></li>
@@ -123,23 +123,23 @@ encoding starts with <code>BYTE</code>. May signal <a href="#x-28TRIVIAL-UTF-8-3
<p>Convert the <code>START</code>, <code>END</code> subsequence of the array of <code>BYTES</code> containing
UTF-8 encoded characters to a <code>STRING</code>. The element type of<code>BYTES</code> may
be anything as long as it can be <code>COERCE</code>d into an <code>(UNSIGNED-BYTES
8)</code> array. May signal <ahref="#x-28TRIVIAL-UTF-8-3AUTF-8-DECODING-ERROR-20CONDITION-29"title="(TRIVIAL-UTF-8:UTF-8-DECODING-ERROR CONDITION)"><code>UTF-8-DECODING-ERROR</code></a>.</p></li>
UTF-8 encoded characters to a <ahref="http://www.lispworks.com/documentation/HyperSpec/Body/t_string.htm"title="(STRING TYPE)"><code>STRING</code></a>. The element type of
<code>BYTES</code> may be anything as long as it can be <ahref="http://www.lispworks.com/documentation/HyperSpec/Body/f_coerce.htm"title="(COERCE FUNCTION)"><code>COERCE</code></a>d into
an <code>(UNSIGNED-BYTES 8)</code> array. May signal <ahref="#x-28TRIVIAL-UTF-8-3AUTF-8-DECODING-ERROR-20CONDITION-29"title="(TRIVIAL-UTF-8:UTF-8-DECODING-ERROR CONDITION)"><code>UTF-8-DECODING-ERROR</code></a>.</p></li>
<p>Read UTF-8 encoded data from <code>INPUT</code>, a byte stream, and construct a
string with the characters found. When <code>NULL-TERMINATED</code> is given,
stop reading at a null character. If <code>STOP-AT-EOF</code>, then stop at
<code>END-OF-FILE</code> without raising an error. The <code>CHAR-LENGTH</code> and
<ahref="http://www.lispworks.com/documentation/HyperSpec/Body/e_end_of.htm"title="(END-OF-FILE CONDITION)"><code>END-OF-FILE</code></a> without raising an error. The <code>CHAR-LENGTH</code> and
<code>BYTE-LENGTH</code> parameters can be used to specify the max amount of
characters or bytes to read, where -1 means no limit. May signal