projects
/
be.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4eb3e0d
)
Enforced that all key/value pairs are unicode
author
Aaron Bentley
<abentley@panoramicfeedback.com>
Thu, 26 Jan 2006 15:10:43 +0000
(10:10 -0500)
committer
Aaron Bentley
<abentley@panoramicfeedback.com>
Thu, 26 Jan 2006 15:10:43 +0000
(10:10 -0500)
libbe/mapfile.py
patch
|
blob
|
history
diff --git
a/libbe/mapfile.py
b/libbe/mapfile.py
index 376093823f3834f3c0c3cd5f57b211aac8e370d6..bbbd860a24f7cb3d85b386b9213b985add54064b 100644
(file)
--- 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