Modules
Objects/Functions
SuiteScript 2.0
{encode}.convert({string: {string*},inputEncoding: {string*},outputEncoding: {string*}})
N/encode Module
encode.convert()
Method Description:
Converts a string to another type of encoding.
Returns:
The re-encoded string
Supported Script Types:
Server-side scripts
For more information, see SuiteScript 2.0 Script Types.
Governance:
None
Module:
N/encode Module
Since:
2015.1
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=encode.convert(options)
Example:
// Code Example 1
//Add additional code
//...
var hexEncodedString = encode.convert({
string: stringInput,
inputEncoding: encode.Encoding.UTF_8,
outputEncoding: encode.Encoding.HEX
});
//...
//Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4369851165.html