Files
kumomta/docs/reference/kumo.encode/charset_decode.md
T
2026-04-29 08:07:13 +01:00

19 lines
600 B
Markdown

# kumo.encode.charset_decode
```lua
kumo.encode.charset_decode(CHARSET, BINARY_INPUT)
```
{{since('2026.04.09-ea3b2a9b')}}
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.