encoding property

FileFormatInfo.encoding property

Gets the detected encoding if applicable to the current document format. At the moment detects encoding only for HTML documents.

get encoding(): string

Examples

Shows how to detect encoding in an html file.

let info = aw.FileFormatUtil.detectFileFormat(base.myDir + "Document.html");

expect(info.loadFormat).toEqual(aw.LoadFormat.Html);

// The Encoding property is used only when we create a FileFormatInfo object for an html document.
expect(info.encoding).toEqual("windows-1252");

See Also