Charset

Members

Functions

bestName
string bestName()

Gets the best charset name based on the charset mask charset.

canEncode
bool canEncode(string charset, string text)

Check to see if the UTF-8 text will fit safely within charset.

init_
void init_()

Initializes a charset mask structure.

step
void step(string inbuf)

Steps through the input buffer 1 unicode character (glyph) at a time (ie, not necessarily 1 byte at a time). Bitwise 'and' our charset->mask with the mask for each glyph. This has the effect of limiting what charsets our charset->mask can match.

Static functions

best
string best(string inbuf)

Computes the best charset to use to encode this text buffer.

canonName
string canonName(string charset)

Attempts to find a canonical charset name for charset.

iconvName
string iconvName(string charset)

Attempts to find an iconv-friendly charset name for charset.

isoToWindows
string isoToWindows(string isocharset)

Maps the ISO-8859-# charset to the equivalent Windows-CP125# charset.

language
string language(string charset)

Attempts to find a specific language code that is specific to charset. Currently only handles CJK and Russian/Ukranian charset->lang mapping. Everything else will return null.

localeName
string localeName()

Gets the user's locale charset (or iso-8859-1 by default).

mapInit
void mapInit()

Initializes character set maps.

mapShutdown
void mapShutdown()

Frees internal lookup tables created in gmime.charset.Charset.mapInit.

name
string name(string charset)

Attempts to find an iconv-friendly charset name for charset.

Variables

level
uint level;

charset level

mask
uint mask;

charset mask