Modules
Objects/Functions
SuiteScript 2.0
// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=File.encoding for more information.
N/file Module
File.encoding
Property Description:
The character encoding on a file. Value is set with the file.Encoding enum.
Type:
string
Supported Script Types:
Server-side scripts
For more information, see SuiteScript 2.0 Script Types.
Module:
N/file Module
Since:
2015.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=File.encoding
Example:
// Code Example 1
//Add additional code
//...
var fileObj = file.create({
name : 'test.txt',
fileType: file.Type.PLAINTEXT,
contents: 'Hello World\nHello World'
});
fileObj.encoding = file.Encoding.MAC_ROMAN;
fileObj.folder = 30;
var fileId = fileObj.save();
//...
//Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4229270853.html