Skip to content

FromBase64

Decodes Base64 text using a server text encoding.

1
myScript.FromBase64(base64: string, encodingCodePage?: number, removeBom?: boolean):string

Parameters

string base64
    The Base64-encoded input.

number encodingCodePage optional
    The .NET code-page number to use. Omit it for UTF-8.

boolean removeBom optional
    Reserved compatibility parameter. The current server implementation removes a UTF-8 BOM regardless of this argument.

Returns

The decoded text.

Remarks

Server workflow scripts only. Use this for text content, not arbitrary binary data.

Examples

Decode text received as Base64

1
2
var csv = Script.FromBase64($Xml.Evaluate('ImportContent'));
var rows = csv.split('\n');

See Also