1.1 --- a/micropython/report.py Fri Oct 11 09:51:39 2013 +0200
1.2 +++ b/micropython/report.py Fri Oct 11 11:40:31 2013 +0200
1.3 @@ -27,6 +27,7 @@
1.4 import sys
1.5 import os
1.6 import textwrap
1.7 +import codecs
1.8
1.9 try:
1.10 set
1.11 @@ -37,7 +38,7 @@
1.12
1.13 # HTML-related output production.
1.14
1.15 -html_header = """<?xml version="1.0" encoding="iso-8859-15"?>
1.16 +html_header = """<?xml version="1.0" encoding="utf-8"?>
1.17 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1.18 <html xmlns="http://www.w3.org/1999/xhtml">
1.19 <head>
1.20 @@ -1531,7 +1532,7 @@
1.21 # Convenience functions.
1.22
1.23 def summarise(module, program, filename):
1.24 - stream = open(filename, "wb")
1.25 + stream = codecs.open(filename, "wb", "utf-8")
1.26 try:
1.27 summary = Summary(module, program)
1.28 summary.to_stream(stream)
1.29 @@ -1539,7 +1540,7 @@
1.30 stream.close()
1.31
1.32 def annotate(module, program, filename):
1.33 - stream = open(filename, "wb")
1.34 + stream = codecs.open(filename, "wb", "utf-8")
1.35 try:
1.36 source = AnnotatedSource(module, program)
1.37 source.to_stream(stream)
1.38 @@ -1547,7 +1548,7 @@
1.39 stream.close()
1.40
1.41 def interfaces(program, filename):
1.42 - stream = open(filename, "wb")
1.43 + stream = codecs.open(filename, "wb", "utf-8")
1.44 try:
1.45 source = Interfaces(program)
1.46 source.to_stream(stream)