Skip to main content
All docs
V24.1

IRichEditDocumentServer.BeforeEncodingDetection Event

Occurs before detecting encoding of the loaded plain text or HTML content.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v24.1.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

event EventHandler<BeforeEncodingDetectionEventArgs> BeforeEncodingDetection

Event Data

The BeforeEncodingDetection event's data class is BeforeEncodingDetectionEventArgs. The following properties provide information specific to this event:

Property Description
Encoding Gets or sets the document encoding.
Handled Gets or sets whether the event is handled.
Stream Obtains a stream with document data.

Remarks

The BeforeEncodingDetection event is raised when the IRichEditDocumentServer attempts to detect encoding of the plain text or HTML text being imported. Handle this event to specify a custom encoding instead of the detected encoding.

The event fires only if the PlainTextDocumentImporterOptions.AutoDetectEncoding or HtmlDocumentImporterOptions.AutoDetectEncoding property is set to true.

See Also