HDAPIEncodeString Method
Base64-encodes a string of text. Supports internal encoding in UTF-8 or UTF-16.

JavaScript API: Direct
Assembly: api.js Version: 1.0.0.0 (1.0.0.0)
Syntax

JavaScript
function EncodeString(str, encoding, bom);

Parameters

str
Type: SystemString
The string of text you wish to encode in Base64.
encoding
Type: SystemString
The internal encoding to use. UTF-8 is used by default; you can also request "UTF-16LE" or "UTF-16BE".
bom
Type: SystemBoolean
Indicates whether or not you wish to include a byte order mark in the encoded byte stream. (If this parameter is omitted, the default is false.)

Return Value

Type: string
The base64-encoded string.
See Also

Reference