Fix HTML export (more encoding stuff). Also fix old bug in which unicode fit names don't display correctly in the webbrowser. #1411
This commit is contained in:
@@ -63,12 +63,14 @@ class exportHtmlThread(threading.Thread):
|
||||
HTML = self.generateFullHTML(sMkt, sFit, dnaUrl)
|
||||
|
||||
try:
|
||||
FILE = open(settings.getPath(), "w")
|
||||
FILE.write(HTML.encode('utf-8'))
|
||||
FILE = open(settings.getPath(), "w", encoding='utf-8')
|
||||
FILE.write(HTML)
|
||||
FILE.close()
|
||||
except IOError:
|
||||
except IOError as ex:
|
||||
print(("Failed to write to " + settings.getPath()))
|
||||
pass
|
||||
except Exception as ex:
|
||||
pass
|
||||
|
||||
if self.callback:
|
||||
wx.CallAfter(self.callback, -1)
|
||||
@@ -84,6 +86,7 @@ class exportHtmlThread(threading.Thread):
|
||||
<head>
|
||||
<title>Pyfa Fittings</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" />
|
||||
<script src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user