Home Forums General XMetaL Discussion Turn off: Automatic Validation befor Saving a Document Reply To: Turn off: Automatic Validation befor Saving a Document

Sebastian

Reply to: Turn off: Automatic Validation befor Saving a Document

I have implemented a custom Save-method as you recommended:

[code]
var fso  = new ActiveXObject(“Scripting.FileSystemObject”);
if (fso != null && absoluteFileName != null && absoluteFileName != “” && str != null) {
    var fh = fso.CreateTextFile(absoluteFileName, true, true);
    if (fh != null) {
        fh.WriteLine(str);
        fh.Close();
        ActiveDocument.Saved = true; 
    }
}
[/code]

But I still have a problem with the encoding of the saved docs. The original doc is econded in UTF8 and should be UTF8 after saving with this method as well (like the standard Save of XMAX does). But the method above changes the encoding to unicode (because of the fso.CreateTextFile I think).

How do I have to modify the method, to safe the docs in UTF8 or even better, to save them in their original encoding (like XMAX behaves)?

Thank you for your quick response.

Reply

Products
Downloads
Support