1.1 --- a/imiptools/profile.py Tue Nov 03 18:51:25 2015 +0100
1.2 +++ b/imiptools/profile.py Tue Nov 03 19:49:06 2015 +0100
1.3 @@ -24,6 +24,7 @@
1.4 from imiptools.filesys import fix_permissions, FileBase
1.5 from os.path import exists, isdir
1.6 from os import listdir, makedirs
1.7 +import codecs
1.8 import pytz
1.9
1.10 def identity_dict(l):
1.11 @@ -191,7 +192,7 @@
1.12 if not filename or not exists(filename):
1.13 raise KeyError, name
1.14
1.15 - f = open(filename)
1.16 + f = codecs.open(filename, encoding="utf-8")
1.17 try:
1.18 return f.read().strip()
1.19 finally:
1.20 @@ -205,7 +206,7 @@
1.21 if not filename:
1.22 return False
1.23
1.24 - f = open(filename, "w")
1.25 + f = codecs.open(filename, "w", encoding="utf-8")
1.26 try:
1.27 f.write(value)
1.28 finally: