Copy link to clipboard
Copied
When i write log file (txt file) the spaeical character are conveted in to junk. How do i resovle the issue
var filename = "HalÃr"
var filename = Hal�r
OS : MAC
Editor : visual studio
I have copied he method for your reference.
function WriteLog(myText, Filename) {
try {
var myLog = new File(Filename);
if (myLog.exists) {
myLog.open("e");
myLog.seek(0, 2);
} else {
myLog.open("w");
}
myLog.writeln(myText);
myLog.close();
} catch (e) {}
}
Would it help to define the encoding of the log file as "UTF-8" ?
myLog.encoding = "UTF-8";
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Would it help to define the encoding of the log file as "UTF-8" ?
myLog.encoding = "UTF-8";
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
No, as this is in source code (although the problematic example line does not appear in the example source), it's a problem in the code editor.
Copy link to clipboard
Copied
You saved my day. Thanks a lot.