FIXED: Problem with new properties of document object

Post bug reports when testing beta versions here.
Post Reply
User avatar
pjj
Posts: 2129
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

FIXED: Problem with new properties of document object

Post 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.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
User avatar
Rickard Johansson
Site Admin
Posts: 6623
Joined: 19 Jul 2006 14:29

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

Post by Rickard Johansson »

Fixed in v11.21 final.
Post Reply