DetectEncoding
LoadOptions.DetectEncoding property
This option enables TXT
, TSV
, and CSV
files encoding detection. In case the encoding can’t be detected the default Encoding
is used.
public bool DetectEncoding { get; set; }
Remarks
Learn more about rendering text and tab/comma delimited files
- Render text documents as HTML, PDF, and image files
- Render Excel and Apple Numbers spreadsheets as HTML, PDF, and image files
Examples
The example demonstrates a typical usage of this option.
LoadOptions loadOptions = new LoadOptions();
loadOptions.DetectEncoding = true; // Enable encoding detection
using (Viewer viewer = new Viewer("employees.csv", loadOptions))
{
HtmlViewOptions viewOptions =
HtmlViewOptions.ForEmbeddedResources();
viewer.View(viewOptions);
}
See Also
- class LoadOptions
- namespace GroupDocs.Viewer.Options
- assembly GroupDocs.Viewer