diff options
author | Stefan Rado <px4@sradonia.net> | 2014-02-16 01:47:11 +0100 |
---|---|---|
committer | Stefan Rado <px4@sradonia.net> | 2014-02-16 01:51:37 +0100 |
commit | 49cc0bd162b63b188c341aab4be880776d21c388 (patch) | |
tree | e1b9369ac0c563841819f4427b1b93c60c59959d /Tools/px4params/output_dokuwiki_tables.py | |
parent | 1c13225b194583945324d247b83a5236e665d919 (diff) | |
download | px4-firmware-49cc0bd162b63b188c341aab4be880776d21c388.tar.gz px4-firmware-49cc0bd162b63b188c341aab4be880776d21c388.tar.bz2 px4-firmware-49cc0bd162b63b188c341aab4be880776d21c388.zip |
Explicitly treat all files as UTF-8.
Diffstat (limited to 'Tools/px4params/output_dokuwiki_tables.py')
-rw-r--r-- | Tools/px4params/output_dokuwiki_tables.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Tools/px4params/output_dokuwiki_tables.py b/Tools/px4params/output_dokuwiki_tables.py index dca3fd92d..aa04304df 100644 --- a/Tools/px4params/output_dokuwiki_tables.py +++ b/Tools/px4params/output_dokuwiki_tables.py @@ -1,4 +1,5 @@ from xml.sax.saxutils import escape +import codecs class DokuWikiTablesOutput(): def __init__(self, groups): @@ -44,11 +45,11 @@ class DokuWikiTablesOutput(): self.output = result; def Save(self, filename): - with open(filename, 'w') as f: + with codecs.open(filename, 'w', 'utf-8') as f: f.write(self.output) def SaveRpc(self, filename): - with open(filename, 'w') as f: + with codecs.open(filename, 'w', 'utf-8') as f: f.write("""<?xml version='1.0'?> <methodCall> <methodName>wiki.putPage</methodName> |