ActiveReports.HtmlExport Request technical support
CharacterSet Property
See Also  Example


Sets or returns the character set encoding that will be used in the exported HTML pages.

Syntax

Visual Basic (Declaration) 
Public Property CharacterSet As HtmlCharacterSet
Visual Basic (Usage)Copy Code
Dim instance As HtmlExport
Dim value As HtmlCharacterSet
 
instance.CharacterSet = value
 
value = instance.CharacterSet
C# 
public HtmlCharacterSet CharacterSet {get; set;}

Return Value

HtmlCharacterSet enumeration.

Example

C#Copy Code
private void btnExport_Click(object sender, System.EventArgs e)
{
   rptDataDynamics rpt =
new rptDataDynamics();
   DataDynamics.ActiveReports.Export.Html.HtmlExport h =
new DataDynamics.ActiveReports.Export.Html.HtmlExport();
   h.CharacterSet = DataDynamics.ActiveReports.Export.Html.HtmlCharacterSet.Big5;
   rpt.Run();
   
this.arv.Document = rpt.Document;
   h.Export(rpt.Document, Application.StartupPath +
"\\h.html");
}
Visual BasicCopy Code
Private Sub Viewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Viewer1.Load
    Dim rpt As New rptDD
    rpt.Run()
    Me.Viewer1.Document = rpt.Document
    Dim h As New DataDynamics.ActiveReports.Export.Html.HtmlExport
    h.CharacterSet = DataDynamics.ActiveReports.Export.Html.HtmlCharacterSet.Big5
    h.Export(rpt.Document, Application.StartupPath + "/export.html")
End Sub

Remarks

The default character set is UTF8. Setting this property will change the meta tag in the header of the resulting HTML pages to the appropriate IANA character set value.

For example: <META content="text/html;charset=ISO-8859-1" http-equiv=Content-Type>.

Additionally, the inner text portion of the pages will be encoded according to the specific character set's encoding rules and font names. If you are exporting a Document without headers (IncludeHtmlHeader=false), then you must insert the appropriate meta tag to ensure that the browser knows how the text is encoded.

See Also