HtmlDocumentImporterOptions.Encoding Property
Gets or sets the encoding used to interpret characters in the document.
Namespace: DevExpress.XtraRichEdit.Import
Assembly: DevExpress.RichEdit.v20.2.Core.dll
NuGet Package: DevExpress.RichEdit.Core
NuGet Packages: DevExpress.RichEdit.Core, DevExpress.WindowsDesktop.RichEdit.Core
Declaration
Property Value
Type | Description |
---|---|
Encoding | A Encoding object providing the conversion between certain encoding and Unicode. |
Property Paths
You can access this nested property as listed below:
Library | Object Type | Path to Encoding |
---|---|---|
WinForms Controls | RichTextEditDocumentImportOptions |
|
Office File API | RichEditDocumentImportOptions |
|
Remarks
Set the HtmlDocumentImporterOptions.AutoDetectEncoding property to false to disable automatic encoding, and then specify the Encoding property, as shown below:
RichEditDocumentServer wordProcessor = new RichEditDocumentServer();
HtmlDocumentImporterOptions htmlImporterOptions = wordProcessor.Options.Import.Html;
htmlImporterOptions.AutoDetectEncoding = false;
htmlImporterOptions.Encoding = Encoding.UTF8;
wordProcessor.LoadDocument("Documents//Doc1.html", DocumentFormat.Html);
See Also