Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the trivial-utf-8 Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Sun May 15 06:21:31 2022 GMT+0.
• Introduction | What trivial-utf-8 is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
# Trivial UTF-8 Manual ###### \[in package TRIVIAL-UTF-8\] ## TRIVIAL-UTF-8 ASDF System - Description: A small library for doing UTF-8-based input and output. - Licence: ZLIB - Author: Marijn Haverbeke- Maintainer: Gábor Melis - Homepage: [https://common-lisp.net/project/trivial-utf-8/](https://common-lisp.net/project/trivial-utf-8/) - Bug tracker: [https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-/issues](https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-/issues) - Source control: [GIT](https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8.git) ## Introduction Trivial UTF-8 is a small library for doing UTF-8-based in- and output on a Lisp implementation that already supports Unicode - meaning CHAR-CODE and CODE-CHAR deal with Unicode character codes. The rationale for the existence of this library is that while Unicode-enabled implementations usually do provide some kind of interface to dealing with character encodings, these are typically not terribly flexible or uniform. The [Babel][babel] library solves a similar problem while understanding more encodings. Trivial UTF-8 was written before Babel existed, but for new projects you might be better off going with Babel. The one plus that Trivial UTF-8 has is that it doesn't depend on any other libraries. [babel]: https://common-lisp.net/project/babel/ ## Links Here is the [official repository][trivial-utf-8-repo] and the [HTML documentation][trivial-utf-8-doc] for the latest version. [trivial-utf-8-repo]: https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8 [trivial-utf-8-doc]: http://melisgl.github.io/mgl-pax-world/trivial-utf-8-manual.html ## Reference - [function] UTF-8-BYTE-LENGTH STRING Calculate the amount of bytes needed to encode STRING. - [function] STRING-TO-UTF-8-BYTES STRING &KEY NULL-TERMINATE Convert STRING into an array of unsigned bytes containing its UTF-8 representation. If NULL-TERMINATE, add an extra 0 byte at the end. - [function] UTF-8-GROUP-SIZE BYTE Determine the amount of bytes that are part of the character whose encoding starts with BYTE. May signal UTF-8-DECODING-ERROR. - [function] UTF-8-BYTES-TO-STRING BYTES &KEY (START 0) (END (LENGTH BYTES)) Convert the START, END subsequence of the array of BYTES containing UTF-8 encoded characters to a [STRING][type]. The element type of BYTES may be anything as long as it can be `COERCE`d into an `(UNSIGNED-BYTES 8)` array. May signal UTF-8-DECODING-ERROR. - [function] READ-UTF-8-STRING INPUT &KEY NULL-TERMINATED STOP-AT-EOF (CHAR-LENGTH -1) (BYTE-LENGTH -1) Read UTF-8 encoded data from INPUT, a byte stream, and construct a string with the characters found. When NULL-TERMINATED is given, stop reading at a null character. If STOP-AT-EOF, then stop at END-OF-FILE without raising an error. The CHAR-LENGTH and BYTE-LENGTH parameters can be used to specify the max amount of characters or bytes to read, where -1 means no limit. May signal UTF-8-DECODING-ERROR. - [condition] UTF-8-DECODING-ERROR SIMPLE-ERROR * * * ###### \[generated by [MGL-PAX](https://github.com/melisgl/mgl-pax)\]
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The trivial-utf-8 system |
Gábor Melis <mega@retes.hu>
Marijn Haverbeke <marijnh@gmail.com>
(:git "https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8.git")
https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-/issues
ZLIB
A small library for doing UTF-8-based input and output.
trivial-utf-8.asd (file)
trivial-utf-8.lisp (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The trivial-utf-8.asd file | ||
• The trivial-utf-8/trivial-utf-8.lisp file |
Next: The trivial-utf-8/trivial-utf-8․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
trivial-utf-8.asd
trivial-utf-8 (system)
Previous: The trivial-utf-8․asd file, Up: Lisp files [Contents][Index]
trivial-utf-8 (system)
trivial-utf-8.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The trivial-utf-8 package |
trivial-utf-8.lisp (file)
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions | ||
• Exported conditions |
Next: Exported conditions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Read UTF-8 encoded data from INPUT, a byte stream, and construct a string with the characters found. When NULL-TERMINATED is given, stop reading at a null character. If STOP-AT-EOF, then stop at END-OF-FILE without raising an error. The CHAR-LENGTH and BYTE-LENGTH parameters can be used to specify the max amount of characters or bytes to read, where -1 means no limit. May signal UTF-8-DECODING-ERROR.
trivial-utf-8.lisp (file)
Convert STRING into an array of unsigned bytes containing its UTF-8 representation. If NULL-TERMINATE, add an extra 0 byte at the end.
trivial-utf-8.lisp (file)
Calculate the amount of bytes needed to encode STRING.
trivial-utf-8.lisp (file)
Convert the START, END subsequence of the array of BYTES containing
UTF-8 encoded characters to a [STRING][type]. The element type of
BYTES may be anything as long as it can be ‘COERCE‘d into
an ‘(UNSIGNED-BYTES 8)‘ array. May signal UTF-8-DECODING-ERROR.
trivial-utf-8.lisp (file)
Determine the amount of bytes that are part of the character whose encoding starts with BYTE. May signal UTF-8-DECODING-ERROR.
trivial-utf-8.lisp (file)
Write STRING to BYTE-STREAM, encoding it as UTF-8. If NULL-TERMINATE, write an extra 0 byte at the end.
trivial-utf-8.lisp (file)
Previous: Exported functions, Up: Exported definitions [Contents][Index]
trivial-utf-8.lisp (file)
simple-error (condition)
:message
:byte
(quote nil)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal macros | ||
• Internal functions |
Next: Internal macros, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
trivial-utf-8.lisp (file)
Next: Internal functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
Given the character CHAR, call the WRITER for every byte in the UTF-8 encoded form of that character. WRITER may a function or a macro.
trivial-utf-8.lisp (file)
Previous: Internal macros, Up: Internal definitions [Contents][Index]
Extract the character from an array of BYTES encoded in GROUP-SIZE number of bytes from the START position. May signal UTF-8-DECODING-ERROR.
trivial-utf-8.lisp (file)
Calculate the length of the string encoded by the subsequence of the array of BYTES bounded by START and END.
trivial-utf-8.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L T |
---|
Jump to: | F L T |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | A F G M R S U W |
---|
Jump to: | A F G M R S U W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
B M S |
---|
Jump to: | *
B M S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C P S T U |
---|
Jump to: | C P S T U |
---|