I am trying to export a text file using JavaScript to be used as macro for Microsoft Dynamics GP.
The problem is Arabic letters don't render correctly when I try to use the macro in GP.
For example "النسر" would render as "ط§ظ„ظ†ط³ط±"
My JavaScript code uses FileSaver.js
var file = new Blob([text], {type:"text/plain;charset=utf-8;"});
saveAs(file, filename);
One solution I found was that after downloading the file I save it with ANSI encoding. But if I changed my charset in the JavaScript Blob object to "ansi" or "Windows-1252" or "cp-1252" it doesn't work.
Note: I am using Chrome on Windows 7