[英]How to control the encoding of html when using python win32com package?
In python, I use win32com to transform word documents to HTML: 在python中,我使用win32com将Word文档转换为HTML:
from win32com import client as wc
import os
word = wc.Dispatch('Word.Application')
doc = word.Documents.Open(wordFullName)
doc.SaveAs(htmlFullName, 10)
But the resulting encoding of the HTML is gb2312: 但是HTML的最终编码为gb2312:
<meta http-equiv=Content-Type content="text/html; charset=gb2312" >
How do you control the encoding option of the resulting HTML? 如何控制结果HTML的编码选项?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.