Hi Aspose-Team,
i'm facing a problem with special unicode characters like '≤'. Here are my code snippets:
XML:
<?xml version="1.0" encoding="utf-16"?>
<AnyDocModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
XSLT:
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="Main" match="node()">
<Pdf xmlns="Aspose.Pdf">
<Section>
<Text><Segment>korrekt ®</Segment></Text>
<Text><Segment>not korrekt ≤</Segment></Text>
</Section>
</Pdf>
</xsl:template>
</xsl:stylesheet>
Binding snippet is pretty common:
Pdf pdf = new Pdf();
pdf.BindXML(xml, xslt);
byte[] pdfFile;
using (MemoryStream memStream = new MemoryStream())
{
pdf.Save(memStream);
memStream.Position = 0;
pdfFile = memStream.ToArray();
}
return pdfFile;
I got character '≤' displayed like 'd' what is absolutely wrong. All charecters (see under http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references) of type HTMLsymbol ('≤', '≠' an so on) or HTMLspecial are always wrong. Characters of type HTMLlat1 ('®', '«') are displayed korrektly.
What am i doing whrong? Do i need configure something or preload somehow whole character table?
Best regard
Alex
i'm facing a problem with special unicode characters like '≤'. Here are my code snippets:
XML:
<?xml version="1.0" encoding="utf-16"?>
<AnyDocModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
XSLT:
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="Main" match="node()">
<Pdf xmlns="Aspose.Pdf">
<Section>
<Text><Segment>korrekt ®</Segment></Text>
<Text><Segment>not korrekt ≤</Segment></Text>
</Section>
</Pdf>
</xsl:template>
</xsl:stylesheet>
Binding snippet is pretty common:
Pdf pdf = new Pdf();
pdf.BindXML(xml, xslt);
byte[] pdfFile;
using (MemoryStream memStream = new MemoryStream())
{
pdf.Save(memStream);
memStream.Position = 0;
pdfFile = memStream.ToArray();
}
return pdfFile;
I got character '≤' displayed like 'd' what is absolutely wrong. All charecters (see under http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references) of type HTMLsymbol ('≤', '≠' an so on) or HTMLspecial are always wrong. Characters of type HTMLlat1 ('®', '«') are displayed korrektly.
What am i doing whrong? Do i need configure something or preload somehow whole character table?
Best regard
Alex