File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -414,9 +414,10 @@ class HTMLDoc(Doc):
414414
415415 def page (self , title , contents ):
416416 """Format an HTML page."""
417- return '''
417+ return '''\
418418 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
419419<html><head><title>Python: %s</title>
420+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
420421</head><body bgcolor="#f0f0f8">
421422%s
422423</body></html>''' % (title , contents )
@@ -1510,7 +1511,7 @@ def writedoc(thing, forceload=0):
15101511 try :
15111512 object , name = resolve (thing , forceload )
15121513 page = html .page (describe (object ), html .document (object , name ))
1513- file = open (name + '.html' , 'w' )
1514+ file = open (name + '.html' , 'w' , encoding = 'utf-8' )
15141515 file .write (page )
15151516 file .close ()
15161517 print ('wrote' , name + '.html' )
You can’t perform that action at this time.
0 commit comments