Page 1 of 1

FIXED: Problem with new properties of document object

Posted: 30 Sep 2016 09:42
by pjj
I tried out new properties of document object; for this I used the code you gave as example, i.e.

Code: Select all

Document.CodePage = 65001; // Change encoding to UTF-8
Document.UseBOM = true; // Use a BOM when saving file
Document.NewlineFormat = "Unix"; // Convert to Unix linefeeds (LF)
I saved it to .jsfs file, though. Running the script through "Run script" button with "User script" toolbar on, on a file in the right view of "Dual document view", gives unexpected results: only NewlineFormat works well. UseBOM never changes BOM (i.e. doesn't add nor delete, if it is present.) "CodePage = 65001" garbles text if it was ANSI-encoded.

On the other hand, this one-liner

Code: Select all

MainApp.NewDocumentEx(".html", 65001, true, "Unix");
works flawlessly.

Re: [11.21b1] Problem with new properties of document object

Posted: 02 Oct 2016 13:31
by Rickard Johansson
Fixed in v11.21 final.