HtmlOutputOptions.Encoding Property

Set the character encoding of the text.

Syntax

string Encoding { set; get; }

Remarks

The following are encodings recognized by HotDocs:

Encoding Comments
ANSI Not recommended because ANSI is not portable.
UTF-8  
UTF-16LE Little endian UTF-16.
UTF-16 Equivalent to UTF-16LE.
UTF-16BE Big endian UTF-16.
windows-1252 ANSI, but specifically the Windows 1252 code page.

By default, all of the above UTF encodings use a byte order mark. To avoid using a byte order mark, the text "-NOBOM" may be appended to the encoding name. UTF-8N signifies UTF-8 with no byte order mark. To ensure that a byte order mark is always included, the text "-BOM" may be appended to the encoding. When converting from RTF or DOCX to HTML, the default encoding is UTF-8 with no byte order mark.

If no encoding is specified, the RTF/DOCX conversion to HTML uses UTF-8 with no byte order mark. If no encoding is specified, and the input template is plain text (TTX), then the encoding of the TTX template is used. The encoding of the TTX template is determined from the byte order mark if there is one. If there is no byte order mark, the encoding is interpreted as ANSI.