Expand description
EITE format compatibility module. Provides conversions and metadata for document character (Dc) arrays and external formats. This module supports parsing, converting, and serializing Dc arrays to and from various external formats, as well as providing metadata and handling warnings for import and export operations.
Import/export/tests support columns take two space-separated levels: ‘
Modules§
- ascii
- ASCII text formatter and token serialization for EITE.
- dcbasenb
- dcBasenb encoding/decoding: pack arbitrary Dcs into Unicode PUA.
- elad
- ELAD (
.elad/.emd) short-Dc ASCII document conversions. - html
- HTML representation formatter and output encoder for EITE.
- integer_
list - Integer list formatting and delimited sequence encoder for EITE.
- sems
- SEMS format parser and exporter for EITE compatibility.
- utf8
- This implements conversion to and from UTF-8, as well as to and from the dcBasenb format (which is implemented as a private-use extension of UTF-8).
Structs§
- DcOutput
Language - Prefilter
Settings - Supported “dct” / document transformations
Enums§
Functions§
- convert_
formats - Wrapper performing in -> internal Dc -> out. Converts input document from one format to another via internal Dc representation.
- dc_
from_ format - Attempt to map a single external-format chunk to a Dc.
- dc_
to_ format - Convert a single Dc to output bytes (for the subset of formats that support a per-Dc conversion).
- dca_
from_ format - Parse input bytes (in a given “format”) into a vector of Dc integers. Many formats are still TODO.
- dca_
to_ format - Convert a Dc array into a target output format (serialized bytes). Returns a vector of bytes representing the Dc array in the specified output format.
- export_
warning - Add an export warning for a specific character index and problem description.
- export_
warning_ unmappable - Add an export warning for an unmappable Dc value at a specific index.
- format_
get_ variant_ type - Get the variant type string for a variant format. Returns the underlying variant type (e.g., “unicodePua”) for a format that is a variant (e.g. “dcBasenb”).
- format_
is_ any_ language - Is the format a language, either human or programming?
- format_
is_ human_ language - Is the format a human language?
- format_
is_ programming_ language - Is the format a programming language?
- format_
is_ variant - Returns true if the format is a variant (as opposed to a base format), false otherwise. Note that this seems to only return true for formats that are only variants, as opposed to things like character encodings that are variants in regard to the html format, but are also formats on their own terms.
- format_
supports_ variant - Check if a format supports a specific variant. Returns true if the format can handle the specified variant, false otherwise.
- format_
supports_ variant_ type - Check if a format supports a given variant type. Returns true if the format can handle the specified variant type, false otherwise. Does NOT expect (or accept) v: prefix that in the type column, denotes a variant type.
- get_
export_ extension - Produce an export filename extension for a format (mirrors JS). Returns the recommended file extension for the given format.
- get_
export_ warnings - Retrieve and clear all export warnings from the state. Returns a vector of warning messages that were collected.
- get_
format_ comments - Get comments for a format. Returns any additional comments or notes associated with the format.
- get_
format_ dc_ export_ support - Get the Dc document export support value for a format. Returns an integer indicating the level of Dc document export support for the format.
- get_
format_ dc_ import_ support - Get the Dc document import support value for a format. Returns an integer indicating the level of Dc document import support for the format.
- get_
format_ export_ support - Get the general export support value for a format. Returns an integer indicating the level of general export support for the format.
- get_
format_ extension - Get the file extension for a format. Returns the default file extension associated with the format, if any.
- get_
format_ id - Returns the internal ID used to reference the format.
- get_
format_ import_ support - Get the general import support value for a format. Returns an integer indicating the level of general import support for the format.
- get_
format_ label - Get the label for a format. Returns a string label that summarizes the format, suitable for display in a UI.
- get_
format_ metrics_ type - Get the metrics type for a format. Returns a string indicating the metrics type (e.g., “character”, “internal-unicode”, “complex-dcBasenb”).
- get_
format_ name - Get the display name for a format. Returns the user-friendly name of the format, suitable for display in a UI.
- get_
format_ tests_ status - Get the test status value for a format. Returns an integer indicating the test coverage status of the format.
- get_
format_ type - Get the type string for a format. Returns a string indicating the type/category of the format (e.g., text, encoding, internal).
- get_
format_ variant_ types - Get the variant types for a format. Returns a list of variant types (e.g., “unicodePua”, or “encoding”) that the format supports. Will NOT include the v: prefix that appears to denote that a given type is exclusively a variant type in the Type column.
- get_
import_ warnings - Retrieve and clear all import warnings from the state. Returns a vector of warning messages that were collected.
- import_
warning - Add an import warning for a specific character index and problem description.
- is_
format - Check if a format is known. Returns true if the format is recognized, false otherwise.
- is_
supported_ input_ format - Check if a format is a supported input format. Returns true if the format can be used as input for conversion, false otherwise.
- is_
supported_ internal_ format - Check if a format is a supported internal format. Returns true if the format is supported for internal processing, false otherwise.
- is_
supported_ output_ format - Check if a format is a supported output format. Returns true if the format can be used as output for conversion, false otherwise.
- is_
variant_ type - Check if a string is a recognized variant type. Returns true if the variant type is one of the known types (“encoding” or “unicodePua”). Does NOT expect a v: prefix for variant types.
- list_
data_ types - List formats used for storing arbitrary data (currently only basenb)
- list_
formats - List all supported formats. Returns a vector of format names that are supported for conversion.
- list_
input_ formats - List all supported input formats. Returns a vector of format names that can be used as input for conversion.
- list_
internal_ formats - List all supported internal formats. Returns a vector of format names that are supported for internal processing.
- list_
output_ formats - List all supported output formats. Returns a vector of format names that can be used as output for conversion.
- list_
variants_ for_ format - List all variants that are available for the given format. Does NOT return v: prefix for variants.
- normalize_
format - Normalize a format name to its canonical representation. Currently, this converts “utf8” to “unicode” as they are functionally equivalent in this context.
- with_
default_ log