Skip to main content

DecodeBytes

DecodeBytes Function

Converts the input bytes to string using the specified encoding.

Syntax

DecodeBytes (scalar Value, scalar EncodingType)

Arguments

ArgumentDescription
scalar ValueA byte array to be decoded
scalar EncodingTypeThe encoding format to which the byte array is to be converted

Examples:

DecodeBytes(ToBytes("68656C6C6F"),"ascii")

Converts the string of hexadecimal characters to bytes and decodes it to ASCII.

DecodeBytes(EncodeBytes("hello world!","ascii"),"us")

Converts the string "hello world!" to bytes using ASCII encoding and returns a string in US format.