TdxHtmlDocumentImporterOptions.Encoding Property
Specifies the character encoding used to interpret characters in an imported HTML document.
Declaration
property Encoding: Word read; write; default CP_UTF8;
Property Value
Type | Default | Description |
---|---|---|
Word | CP_UTF8 | The target character encoding. |
Remarks
Use the Encoding
property to specify the target character encoding explicitly when the AutoDetectEncoding property is set to False
.
The following code example loads an HTML document with the explicitly specified UTF-7 encoding:
var
ADocumentServer: TdxRichEditDocumentServer;
begin
ADocumentServer := TdxRichEditDocumentServer.Create(nil);
ADocumentServer.Options.Import.Html.AutoDetectEncoding := False;
ADocumentServer.Options.Import.Html.Encoding := CP_UTF7;
ADocumentServer.LoadDocument('Document1.html');
// ...
ADocumentServer.Free;
end;
The Encoding
property’s default value is CP_UTF8
.
See Also