Excerpt | ||
---|---|---|
| ||
treats the input string as binary and attempts to convert it to the specified charset (autodetecting if none is specified).changeCharset(value, charset) Converts a binary string into one with the appropriate charset |
Function: changeCharset()
Converts a binary string into one with the appropriate charset.
Supports auto detection if a value of "auto" or "null" is provided.
Syntax
changeCharset(value, charset)
Argument | Type | Description |
---|---|---|
value | String | Input value treated as a binary string |
charset | Strnig | Target charset to convert to. "auto": automatically detects |
Examples
changeCharset(in.body, "auto")
Where in.body has been read from another source. Returns a string automatically detecting the best charset.