Hello! Faced the following problem. I am creating a new Html document in which I use Russian text. The problem is that when the created document is opened in the browser, the Russian text is not displayed, instead of it various characters. I understand that there is a problem with the encoding, but I cannot figure out how to solve it. If I add manually to the META charset = utf-8 file everything works correctly. Is there a way to enter this line in the code? I’ve tried creating an object of type HTMLMetaElement, but it doesn’t have a charset property. Here is the code
var document = new Aspose.Html.HTMLDocument();
var meta = document.CreateElement(“META”) as HTMLMetaElement;
var table = document.CreateElement(“TABLE”) as HTMLTableElement;
table.Border = “0”;
table.Width = “86%”;
table.Align = “center”;
var tableRow = document.CreateElement(“TR”) as HTMLTableRowElement;
table.AppendChild(tableRow);
var tableCell = document.CreateElement(“TD”) as HTMLTableCellElement;
table.AppendChild(tableCell);
var h2 = document.CreateElement(“H2”) as HTMLHeadingElement;
h2.TextContent = “Отчёт: Использование понятий модели”;
table.AppendChild(h2);
var br = document.CreateElement(“BR”) as HTMLBRElement;
var h1 = document.CreateElement(“H1”) as HTMLHeadingElement;
h1.TextContent = “Выполнить техпроцесс 1”;
br.AppendChild(h1);
table.AppendChild(br);
document.Body.AppendChild(table);
document.Save(@“d:\job\projects\Report_HTML\files\content\summary.html”);