Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxHtmlDocumentExporterOptions.Encoding Property

Specifies the code page identifier of the target character encoding applied to exported HTML documents.

#Declaration

Delphi
property Encoding: Word read; write; default CP_UTF8;

#Property Value

Type Default
Word CP_UTF8

#Remarks

Use this property to change the default HTML charset for exported documents. The resulting document includes information on the target character encoding within the <meta> element, as the charset attribute’s value. For example (if the UseHtml5 property is set to True):

// HTML
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
...

Note

ANSI code pages can be different on different machines. Use Unicode, such as UTF-8 (default), UTF-7, or UTF-16 for the best HTML document compatibility.

The Encoding property’s default value is CP_UTF8.

See Also