gmime.charset
Module for [Charset] struct
struct Charset
Types 1
structCharset
State used by gmime.charset.Charset.best and gmime.charset.Charset.bestName.
Fields
uint maskcharset maskuint levelcharset levelMethods
string bestName() nothrowGets the best charset name based on the charset mask charset. Returns: the charset name that best represents the charset mask charset or null for us-ascii.bool canEncode(string charset, string text) nothrowCheck to see if the UTF-8 text will fit safely within charset.void step(string inbuf) nothrowSteps 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 lim...string best(string inbuf) static nothrowComputes the best charset to use to encode this text buffer.string canonName(string charset) static nothrowAttempts to find a canonical charset name for charset.string iconvName(string charset) static nothrowAttempts to find an iconv-friendly charset name for charset.string isoToWindows(string isocharset) static nothrowMaps the ISO-8859-# charset to the equivalent Windows-CP125# charset.string language(string charset) static nothrowAttempts 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.void mapShutdown() static nothrowFrees internal lookup tables created in [gmime.charset.Charset.mapInit].string name(string charset) static nothrowAttempts to find an iconv-friendly charset name for charset.