How to control the encoding of html when using python win32com package?
سؤال
In python, I use win32com to transform word documents to 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:
<meta http-equiv=Content-Type content="text/html; charset=gb2312" >
How do you control the encoding option of the resulting HTML?
المحلول
لا تنتمي إلى StackOverflow