kumo.encode.charset_decode
Since: Version 2026.04.09-ea3b2a9b
The functionality described in this section requires version 2026.04.09-ea3b2a9b of KumoMTA, or a more recent version.
Given an the input string BINARY_INPUT, which is likely a binary string,
attempt to decode the string from the named CHARSET,
which must be one of the charsets supported by the
converter (the most common latin, japanese, chinese, korean and cyrillic code
pages are supported), into UTF-8.
Any error attempt to decode the string will cause a lua error to propagate.
The return value, on successful decoding, will be a representation of
BINARY_INPUT encoded as UTF-8.