سؤال

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?

هل كانت مفيدة؟
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top