Module dlib.text.encodings
Generic encoding tools
Description
This module works with any encoder and decoder structs that implement the following basic interfaces:
struct Encoder
{
// Encodes a Unicode code point to user-provided buffer.
// Should return bytes written or 0 at error
size_t encode(uint codePoint, char[] buffer)
}
struct Decoder
{
// An input range that iterates characters of a string,
// decoding them to Unicode code points
auto decode(string input)
}
Functions
Name | Description |
---|---|
transcode(input)
|
Converts a string from one encoding to another. Decoder and encoder are specified at compile time |