我有一个带有非ascii字符的html文本,我希望它使用HtmlEasyPrinting模块打印。
printer = HtmlEasyPrinting()
text = '''
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<b><</b>
<p>é</p>
</body>
</html>'''
printer.PreviewText(text)
printer.PrintText(text)
当我运行预览部分时,一切看起来都不错! (正确的编码应用) 当我尝试使用PrintText时,出现了问题,似乎非ascii字符在纸张/导出文件上得到了有趣的表示。
任何人都知道为什么预览工作正常,但不是打印本身?是否有一些设置需要应用?
wx.version = 2.8.11.0(gtk2-unicode) python 2.7