utilsDecode8bit

fnstring utilsDecode8bit(gmime.parser_options.ParserOptions options, ubyte[] text)

Attempts to convert text in an unknown 8bit/multibyte charset into UTF-8 by finding the charset which will convert the most bytes into valid UTF-8 characters as possible. If no exact match can be found, it will choose the best match and convert invalid byte sequences into question-marks (?) in the returned string buffer.

Parameters

optionsa #GMimeParserOptions or null
textinput text in unknown 8bit/multibyte character set

Returns

a UTF-8 string representation of text.