diff options
-rw-r--r-- | libbe/mapfile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbe/mapfile.py b/libbe/mapfile.py index 3760938..bbbd860 100644 --- a/libbe/mapfile.py +++ b/libbe/mapfile.py @@ -67,7 +67,7 @@ def generate(f, map, context=3): for key in keys: for i in range(context): f.write("\n") - f.write("%s=%s\n" % (key, map[key])) + f.write("%s=%s\n" % (key.encode("utf-8"), map[key].encode("utf-8"))) for i in range(context): f.write("\n") @@ -94,7 +94,7 @@ def parse(f): line = line.rstrip('\n') if len(line) == 0: continue - name,value = line.split('=', 1) + name,value = [f.decode('utf-8') for f in line.split('=', 1)] assert not result.has_key('name') result[name] = value return result |