Stay organized with collections
Save and categorize content based on your preferences.
Decodes given data to string, assuming the specified character set.
Each byte that cannot be correctly decoded using the specified charset is
represented in the output by the \uFFFD codepoint.
Arguments
Arguments
data
bytes
The input to be decoded.
charset
string
The IANA charset name; e.g. UTF-8, US-ASCII, ISO-8859-2. Case-insensitive. Default: UTF-8.
Returns
The decoded text.
Raised exceptions
Exceptions
ValueError
If the charset is unsupported.
Examples
# Return "Hello World" using `text.decode` function-assignStep:assign:# Assign Base64 text "Hello World"-base64Text:"SGVsbG8gV29ybGQ="# Decode Base64 text into bytes-decodedBytes:${base64.decode(base64Text)}-returnStep:# Decode bytes to stringreturn:${text.decode(decodedBytes, "UTF-8")}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-06 UTC."],[],[]]