CharsetEncode()
Uses the specified encoding to convert binary data to a string.
CharsetEncode( binary=binary, encoding=string );
Returns: String
| Argument | Description |
|---|---|
|
binary
binary,
required
|
edit
A variable containing binary data to decode into text. Alias: binaryData |
|
encoding
string,
required
|
edit
The character encoding that was used to encode the string into binary format. |
Examples
editdecoded = CharsetDecode("I am a string.", "utf-8");
dump(CharsetEncode(decoded, "utf-8")); // "I am a string"
See also
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)