amalthea.encoding

Undocumented in source.

Public Imports

amalthea.libcore
public import amalthea.libcore;
Undocumented in source.

Members

Aliases

KOI8RString
alias KOI8RString = immutable(KOI8RChar)[]
Undocumented in source.
KOI8UString
alias KOI8UString = immutable(KOI8UChar)[]
Undocumented in source.

Classes

AsciiBasedEncoding
class AsciiBasedEncoding

Abstract base class for all ASCII based encoding schemes of Amalthea.

EncodingSchemeKOI8R
class EncodingSchemeKOI8R

EncodingScheme to handle KOI8-R.

EncodingSchemeKOI8U
class EncodingSchemeKOI8U

EncodingScheme to handle KOI8-U.

Enums

KOI8RChar
enum KOI8RChar

Defines a KOI8-R character and string.

KOI8UChar
enum KOI8UChar

Defines an KOI8-U character and string.

Functions

decodeByEncodingName
string decodeByEncodingName(ubyte[] s, string encodingName)

Decodes to UTF-8 string from byte representaion by encoding name.

encodeByEncodingName
ubyte[] encodeByEncodingName(string s, string encodingName)

Decodes to any type string from UTF-8 representaion by encoding name.

encodeFromUTF32
AsciiBasedString encodeFromUTF32(dstring s, bool safe)

Gets encoded Amalthea ASCII based string from dstring (UTF-32).

encodeText
ubyte[] encodeText(T[] seq, string fromEncoding, string toEncoding)

The function tries to encode text sequence to new encoding. The convertation is based on libiconv. The list is available with 'iconv --list'.

getEncodingNameByType
string getEncodingNameByType()

Gets encoding name by string type.

safeEncodeFromUTF32
AsciiBasedString safeEncodeFromUTF32(dstring s)

Encodes dstring to KOI8RString or KOI8UString. The input does not have to be valid.

transcode
void transcode(AsciiBasedString source, dstring dest)

Convert a string from Amalthea ASCII based encoding to UTF-32.

transcode
void transcode(AsciiBasedString source, string dest)

Convert a string from Amalthea ASCII based encoding to UTF-8.

transcode
void transcode(dstring source, AsciiBasedString dest)

Convert a string from UTF-32 to Amalthea ASCII based encoding.

transcode
void transcode(string source, AsciiBasedString dest)

Convert a string from UTF-8 to Amalthea ASCII based encoding.

Mixin templates

ConversionInjection
mixintemplate ConversionInjection(CodeUnitType)

Template for use by all descendants of AsciiBasedEncoding. This template forms conversion tables for current encoding and UTF-32.

Structs

UniString
struct UniString

A universal string containing string data and information about its encoding.

Variables

asciiTable
dstring asciiTable;

American Standard Code for Information Interchange, 128 bit encoding

Meta