summaryrefslogtreecommitdiff
path: root/a2x.py
diff options
context:
space:
mode:
Diffstat (limited to 'a2x.py')
-rwxr-xr-xa2x.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/a2x.py b/a2x.py
index cd95c99..8ec66c4 100755
--- a/a2x.py
+++ b/a2x.py
@@ -237,7 +237,9 @@ def find_resources(files, tagname, attrname, filter=None):
if OPTIONS.dry_run:
continue
parser = FindResources()
- parser.feed(open(f).read())
+ # UTF-8 is a better bet than the default ASCII.
+ # See http://bugs.python.org/issue3932
+ parser.feed(open(f).read().decode('utf8'))
parser.close()
result = list(set(result)) # Drop duplicate values.
result.sort()