CharsetDecode

Encodes a string to a binary representation

Method Signature

CharsetDecode(encoded_binary=[string], encoding=[string])

Arguments

Argument
Type
Required
Description
Default

encoded_binary

string

true

The string to encode to binary

encoding

string

false

The charset encoding to use (default: utf-8 )

utf-8

Examples

Decode a string using utf-8 back into binary encoding of the string

Use charsetDecode to decode with utf-8

Run Example

charsetDecode( "string", "utf-8" );

Result: [B@5d9905a6

Decode a string using us-ascii back into binary encoding of the string

Use charsetDecode to decode with us-ascii

Run Example

charsetDecode( "string", "us-ascii" );

Result: [B@8154ffd

Additional Examples

Run Example

dump( CharsetDecode( "I am a string.", "utf-8" ) );

Last updated

Was this helpful?