Skip to end of banner
Go to start of banner

ICONV - Encode and Decode Functions

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

The iconv encode and decode functions can be used to encode/decode strings into/from a specified encoding type. Supported types are UTF-8, UTF-16, and UTF-32. 

encode

Description

Encodes a string in the specified encoding format and returns that as a byte array. 

Syntax
Example
Expression: iconv.encode($msg,"UTF-8")
where $msg contains a string "Hello, World".
Result: "_snaptype_binary_base64": "/v8ASABlAGwAbABvACwAIABXAG8AcgBsAGQ="

decode

Description

Decodes an encoded byte array and returns a string in the specified encoding type. 

Syntax
Example
Expression: iconv.decode($msg_encoded,"UTF-8")
where $msg_encoded contains an encoded string.
Result: "Hello, World"
  • No labels