Skip to content

FromBase64

Decodes Base64 text using a server text encoding.

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.

Example

1
2
3
var encoded = Script.ToBase64("Merhaba");
var decoded = Script.FromBase64(encoded);
// decoded is "Merhaba"

See Also