Module text

Module text 

Source
Expand description

Shared text encoding helpers for binary format parsers/writers.

Structs§

DecodeTextError
Error returned when strict byte decoding encounters malformed input.
EncodeTextError
Error returned when strict text encoding would lose information.
LanguageEncodingError
Error returned when a language ID does not map to a supported text encoding.

Enums§

TextEncoding
Text encodings currently used by supported KotOR formats.

Functions§

decode_text
Decodes bytes into Unicode text.
decode_text_strict
Decodes bytes into Unicode text using strict lossless behavior.
encode_text
Encodes Unicode text into bytes using strict lossless behavior.
text_encoding_for_language
Resolves the text encoding for a KotOR language ID.