Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the babel Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Sun May 15 03:21:08 2022 GMT+0.
• Introduction | What babel is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Babel is a charset encoding/decoding library, not unlike GNU libiconv, but completely written in Common Lisp.
It strives to achieve decent performance. To that effect, we use OpenMCL's approach of calculating the destination buffer size in advance. Most of the encoding/decoding algorithms have been adapted from OpenMCL's source.
Another important goal is reusability. Similarly to SBCL, we define an interface wherein the algorithms can be reused between a variety of data types so long we're dealing with conversions between octets and unicode code points.
Babel comes with converters between strings and (unsigned-byte 8) vectors but can be easily extended to deal with, e.g., strings and foreign memory, vectors and Closure's runes, etc...
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The babel system |
Luis Oliveira <loliveira@common-lisp.net>
MIT
Babel, a charset conversion library.
babel.asd (file)
src (module)
Modules are listed depth-first from the system components tree.
• The babel/src module |
babel (system)
src/
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The babel/src/packages․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
babel.asd
babel (system)
Next: The babel/src/encodings․lisp file, Previous: The babel․asd file, Up: Lisp files [Contents][Index]
src (module)
src/packages.lisp
Next: The babel/src/enc-ascii․lisp file, Previous: The babel/src/packages․lisp file, Up: Lisp files [Contents][Index]
packages.lisp (file)
src (module)
src/encodings.lisp
Next: The babel/src/enc-ebcdic․lisp file, Previous: The babel/src/encodings․lisp file, Up: Lisp files [Contents][Index]
encodings.lisp (file)
src (module)
src/enc-ascii.lisp
Next: The babel/src/enc-ebcdic-int․lisp file, Previous: The babel/src/enc-ascii․lisp file, Up: Lisp files [Contents][Index]
enc-ascii.lisp (file)
src (module)
src/enc-ebcdic.lisp
Next: The babel/src/enc-iso-8859․lisp file, Previous: The babel/src/enc-ebcdic․lisp file, Up: Lisp files [Contents][Index]
enc-ebcdic.lisp (file)
src (module)
src/enc-ebcdic-int.lisp
Next: The babel/src/enc-unicode․lisp file, Previous: The babel/src/enc-ebcdic-int․lisp file, Up: Lisp files [Contents][Index]
enc-ebcdic-int.lisp (file)
src (module)
src/enc-iso-8859.lisp
Next: The babel/src/enc-cp437․lisp file, Previous: The babel/src/enc-iso-8859․lisp file, Up: Lisp files [Contents][Index]
enc-iso-8859.lisp (file)
src (module)
src/enc-unicode.lisp
Next: The babel/src/enc-cp1251․lisp file, Previous: The babel/src/enc-unicode․lisp file, Up: Lisp files [Contents][Index]
enc-unicode.lisp (file)
src (module)
src/enc-cp437.lisp
+cp437-to-unicode+ (constant)
Next: The babel/src/enc-cp1252․lisp file, Previous: The babel/src/enc-cp437․lisp file, Up: Lisp files [Contents][Index]
enc-cp437.lisp (file)
src (module)
src/enc-cp1251.lisp
Next: The babel/src/jpn-table․lisp file, Previous: The babel/src/enc-cp1251․lisp file, Up: Lisp files [Contents][Index]
enc-cp1251.lisp (file)
src (module)
src/enc-cp1252.lisp
Next: The babel/src/enc-jpn․lisp file, Previous: The babel/src/enc-cp1252․lisp file, Up: Lisp files [Contents][Index]
enc-cp1252.lisp (file)
src (module)
src/jpn-table.lisp
Next: The babel/src/enc-gbk․lisp file, Previous: The babel/src/jpn-table․lisp file, Up: Lisp files [Contents][Index]
jpn-table.lisp (file)
src (module)
src/enc-jpn.lisp
Next: The babel/src/enc-koi8․lisp file, Previous: The babel/src/enc-jpn․lisp file, Up: Lisp files [Contents][Index]
enc-jpn.lisp (file)
src (module)
src/enc-gbk.lisp
Next: The babel/src/external-format․lisp file, Previous: The babel/src/enc-gbk․lisp file, Up: Lisp files [Contents][Index]
enc-gbk.lisp (file)
src (module)
src/enc-koi8.lisp
Next: The babel/src/strings․lisp file, Previous: The babel/src/enc-koi8․lisp file, Up: Lisp files [Contents][Index]
enc-koi8.lisp (file)
src (module)
src/external-format.lisp
eol-style (type)
Next: The babel/src/gbk-map․lisp file, Previous: The babel/src/external-format․lisp file, Up: Lisp files [Contents][Index]
external-format.lisp (file)
src (module)
src/strings.lisp
Next: The babel/src/sharp-backslash․lisp file, Previous: The babel/src/strings․lisp file, Up: Lisp files [Contents][Index]
strings.lisp (file)
src (module)
src/gbk-map.lisp
*gbk-unicode-mapping* (special variable)
Previous: The babel/src/gbk-map․lisp file, Up: Lisp files [Contents][Index]
gbk-map.lisp (file)
src (module)
src/sharp-backslash.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The babel package | ||
• The babel-encodings package |
Next: The babel-encodings package, Previous: Packages, Up: Packages [Contents][Index]
packages.lisp (file)
Previous: The babel package, Up: Packages [Contents][Index]
packages.lisp (file)
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 constants | ||
• Exported special variables | ||
• Exported macros | ||
• Exported functions | ||
• Exported generic functions | ||
• Exported conditions | ||
• Exported classes | ||
• Exported types |
Next: Exported special variables, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
An alias for CL:CHAR-CODE-LIMIT which might be lower than #x110000 on some Lisps.
strings.lisp (file)
Next: Exported macros, Previous: Exported constants, Up: Exported definitions [Contents][Index]
Special variable used to determine the default character encoding.
encodings.lisp (file)
The end-of-line style used by external formats if none is explicitly given. Depends on the OS the code is compiled on.
external-format.lisp (file)
If non-NIL, encoding or decoding errors are suppressed and the the current character encoding’s default replacement character is used.
encodings.lisp (file)
Next: Exported functions, Previous: Exported special variables, Up: Exported definitions [Contents][Index]
sharp-backslash.lisp (file)
encodings.lisp (file)
Like WITH-SIMPLE-VECTOR but bound-checks START and END.
strings.lisp (file)
If VECTOR is a displaced or adjustable array, binds V to the
underlying simple vector, adds an adequate offset to START and
END and binds those offset values to S and E. Otherwise, if
VECTOR is already a simple array, it’s simply bound to V with no
further changes.
START and END are unchecked and assumed to be within bounds.
Note that in some Lisps, a slow copying implementation is necessary to obtain a simple vector thus V will be bound to a copy of VECTOR coerced to a simple-vector. Therefore, you shouldn’t attempt to modify V.
strings.lisp (file)
Next: Exported generic functions, Previous: Exported macros, Up: Exported definitions [Contents][Index]
Optimized equivalent of
(string-to-octets (apply #’concatenate ’string strings)
:encoding encoding)
strings.lisp (file)
external-format.lisp (file)
external-format.lisp (file)
Lookups the character encoding denoted by the keyword symbol NAME. Signals an error if one is not found. If NAME is already a CHARACTER-ENCONDING object, it is returned unmodified.
encodings.lisp (file)
List of keyword symbols denoting supported character encodings. This list does not include aliases.
encodings.lisp (file)
HT should be an hashtable created by INSTANTIATE-CONCRETE-MAPPINGS. ENCODING should be either an external format, an encoding object or a keyword symbol denoting a character encoding name or one of its aliases.
external-format.lisp (file)
external-format.lisp (file)
strings.lisp (file)
sharp-backslash.lisp (file)
strings.lisp (file)
strings.lisp (file)
strings.lisp (file)
Next: Exported conditions, Previous: Exported functions, Up: Exported definitions [Contents][Index]
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated writer method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated writer method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated writer method
encodings.lisp (file)
automatically generated reader method
external-format.lisp (file)
automatically generated reader method
external-format.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated writer method
encodings.lisp (file)
Next: Exported classes, Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
encodings.lisp (file)
error (condition)
:buffer
character-coding-error-buffer (generic function)
:position
character-coding-error-position (generic function)
:encoding
character-coding-error-encoding (generic function)
encodings.lisp (file)
character-coding-error (condition)
character-decoding-error-octets (method)
:octets
character-decoding-error-octets (generic function)
encodings.lisp (file)
character-coding-error (condition)
invalid-gbk-character (condition)
character-encoding-error-code (method)
:code
character-encoding-error-code (generic function)
Signalled when the character being decoded is out of range.
encodings.lisp (file)
character-decoding-error (condition)
Signalled by DECODERs or CODE-POINT-COUNTERs of variable-width character encodings.
encodings.lisp (file)
character-decoding-error (condition)
Signalled when an invalid UTF-8 continuation byte is found.
enc-unicode.lisp (file)
character-decoding-error (condition)
Signalled when an invalid UTF-8 starter byte is found.
enc-unicode.lisp (file)
character-decoding-error (condition)
Signalled upon overlong UTF-8 sequences.
enc-unicode.lisp (file)
character-decoding-error (condition)
Next: Exported types, Previous: Exported conditions, Up: Exported definitions [Contents][Index]
encodings.lisp (file)
standard-object (class)
:name
(error "must specify a name for this character encoding.")
enc-name (generic function)
:documentation
enc-documentation (generic function)
:aliases
enc-aliases (generic function)
:code-unit-size
8
enc-code-unit-size (generic function)
:max-units-per-char
1
enc-max-units-per-char (generic function)
:native-endianness
t
enc-native-endianness (generic function)
:decode-literal-code-unit-limit
0
enc-decode-literal-code-unit-limit (generic function)
:encode-literal-code-unit-limit
0
enc-encode-literal-code-unit-limit (generic function)
:use-bom
enc-use-bom (generic function)
:bom-encoding
enc-bom-encoding (generic function)
:nul-encoding
#(0)
enc-nul-encoding (generic function)
:default-replacement
26
enc-default-replacement (generic function)
:ambiguous
ambiguous-encoding-p (generic function)
An EXTERNAL-FORMAT consists in a combination of a Babel CHARACTER-ENCODING and an end-of-line style.
external-format.lisp (file)
standard-object (class)
babel-encodings:character-encoding
:encoding
external-format-encoding (generic function)
babel::eol-style
:eol-style
babel:*default-eol-style*
external-format-eol-style (generic function)
Previous: Exported classes, Up: Exported definitions [Contents][Index]
Alias for (SIMPLE-ARRAY UNICODE-CHAR (*)).
strings.lisp (file)
This character type can hold any characters whose CHAR-CODEs are less than UNICODE-CHAR-CODE-LIMIT.
strings.lisp (file)
Alias for (VECTOR UNICODE-CHAR *).
strings.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal constants | ||
• Internal special variables | ||
• Internal macros | ||
• Internal functions | ||
• Internal generic functions | ||
• Internal conditions | ||
• Internal classes | ||
• Internal types |
Next: Internal special variables, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
enc-unicode.lisp (file)
enc-cp1251.lisp (file)
enc-cp1252.lisp (file)
enc-cp437.lisp (file)
Default ASCII substitution character code point used in case of an encoding/decoding error.
encodings.lisp (file)
enc-ebcdic.lisp (file)
enc-ebcdic.lisp (file)
enc-gbk.lisp (file)
enc-gbk.lisp (file)
enc-gbk.lisp (file)
enc-gbk.lisp (file)
enc-gbk.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-koi8.lisp (file)
enc-koi8.lisp (file)
enc-koi8.lisp (file)
Unicode replacement character code point.
enc-unicode.lisp (file)
enc-unicode.lisp (file)
enc-unicode.lisp (file)
enc-cp1251.lisp (file)
enc-iso-8859.lisp (file)
enc-cp1252.lisp (file)
enc-iso-8859.lisp (file)
enc-koi8.lisp (file)
enc-cp1251.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-cp1252.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-cp1251.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-iso-8859.lisp (file)
enc-koi8.lisp (file)
enc-koi8.lisp (file)
enc-koi8.lisp (file)
enc-koi8.lisp (file)
Next: Internal macros, Previous: Internal constants, Up: Internal definitions [Contents][Index]
encodings.lisp (file)
encodings.lisp (file)
jpn-table.lisp (file)
enc-jpn.lisp (file)
jpn-table.lisp (file)
jpn-table.lisp (file)
enc-jpn.lisp (file)
gbk-map.lisp (file)
strings.lisp (file)
strings.lisp (file)
encodings.lisp (file)
enc-jpn.lisp (file)
enc-jpn.lisp (file)
enc-ebcdic-int.lisp (file)
enc-ebcdic-int.lisp (file)
enc-ebcdic-int.lisp (file)
Next: Internal functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
enc-unicode.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
enc-unicode.lisp (file)
enc-unicode.lisp (file)
enc-unicode.lisp (file)
enc-unicode.lisp (file)
enc-unicode.lisp (file)
strings.lisp (file)
strings.lisp (file)
strings.lisp (file)
strings.lisp (file)
enc-unicode.lisp (file)
enc-unicode.lisp (file)
Next: Internal generic functions, Previous: Internal macros, Up: Internal definitions [Contents][Index]
encodings.lisp (file)
strings.lisp (file)
strings.lisp (file)
enc-jpn.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
enc-jpn.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
encodings.lisp (file)
sharp-backslash.lisp (file)
encodings.lisp (file)
sharp-backslash.lisp (file)
enc-jpn.lisp (file)
enc-jpn.lisp (file)
Next: Internal conditions, Previous: Internal functions, Up: Internal definitions [Contents][Index]
automatically generated reader method
encodings.lisp (file)
automatically generated writer method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated writer method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated writer method
encodings.lisp (file)
automatically generated reader method
encodings.lisp (file)
automatically generated writer method
encodings.lisp (file)
Next: Internal classes, Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
Signalled when an invalid GBK byte is found.
enc-gbk.lisp (file)
character-decoding-error (condition)
Signalled when an invalid GBK character is found.
enc-gbk.lisp (file)
character-encoding-error (condition)
Next: Internal types, Previous: Internal conditions, Up: Internal definitions [Contents][Index]
encodings.lisp (file)
standard-object (class)
(quote babel-encodings::make-dummy-coder)
encoder-factory (generic function)
(setf encoder-factory) (generic function)
(quote babel-encodings::make-dummy-coder)
decoder-factory (generic function)
(setf decoder-factory) (generic function)
(quote babel-encodings::make-fixed-width-counter)
octet-counter-factory (generic function)
(setf octet-counter-factory) (generic function)
(quote babel-encodings::make-fixed-width-counter)
code-point-counter-factory (generic function)
(setf code-point-counter-factory) (generic function)
encodings.lisp (file)
standard-object (class)
encoder (generic function)
(setf encoder) (generic function)
decoder (generic function)
(setf decoder) (generic function)
octet-counter (generic function)
(setf octet-counter) (generic function)
code-point-counter (generic function)
(setf code-point-counter) (generic function)
Previous: Internal classes, Up: Internal definitions [Contents][Index]
encodings.lisp (file)
Possible end-of-line styles.
external-format.lisp (file)
encodings.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: | B F L M |
---|
Jump to: | B F L M |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
A B C D E F G I L M N O S U V W |
---|
Jump to: | %
(
A B C D E F G I L M N O S U V W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
+
A B C D E M N O P S U |
---|
Jump to: | *
+
A B C D E M N O P S U |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | A B C E I O P S T U |
---|
Jump to: | A B C E I O P S T U |
---|