Files
kumomta/docs/reference/kumo.encode/charset_decode.md
T
Wez Furlong 8cb8b3fa7e new: kumo.encode.charset_decode/kumo.encode.charset_encode
These are more immediately useful to me for writing tests, but are
generally useful when you have a policy that might need to to deal
with legacy encoding schemes more directly.
2026-03-28 07:20:34 +00:00

584 B

kumo.encode.charset_decode

kumo.encode.charset_decode(CHARSET, BINARY_INPUT)

{{since('dev')}}

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.