RE: 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.

<script>

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();

</script>

Thank you.

eaw Rookie Asked on May 22, 2021 in SuiteCloud.
Add Comment
1 Answers

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.