N/file : create file with encoding “ANSI”

I would like to convert the encoding UTF8 to ANSI with N/file module.

how to create a file with encoding ANSI, Please also suggest me.


var fileObj = file.create({

name : name,

fileType : file.Type.PLAINTEXT,

contents : contents, // the contents is encoding UTF8

folder : folderID


fileObj.isOnline = false;

//fileObj.encoding => ‘ANSI’ /*Can we save file with encoding ANSI?*/

var fileID = fileObj.save();


Thank you.

Rookie Asked on May 22, 2021 in SuiteCloud.
Add Comment
1 Answer(s)

Your encoding options are found at file.Encoding. You probably want Windows 1252.

Advanced Answered on May 22, 2021.

Thank you.

on May 27, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor