More unicode stuff
authorAaron Bentley <abentley@panoramicfeedback.com>
Thu, 26 Jan 2006 15:18:42 +0000 (10:18 -0500)
committerAaron Bentley <abentley@panoramicfeedback.com>
Thu, 26 Jan 2006 15:18:42 +0000 (10:18 -0500)
beweb/common.cfg
libbe/bugdir.py

index 50febb514bc2a894b81ae8f3d9d86becc0d4e945..de0d84faecb69feccf23b027edf43d6a8caeadf5 100644 (file)
@@ -5,3 +5,5 @@ staticFilter.dir = "static"
 [/favicon.ico]
 staticFilter.on = True
 staticFilter.file = "static/images/favicon.ico"
+[/]
+decodingFilter.on = True
index d30bc754fefcf92b583cf48723982df097598366..766ccd985288add46bc74a529cf15d62e8c3c82a 100644 (file)
@@ -345,7 +345,7 @@ class Comment(object):
             self.date = utility.str_to_time(mapfile["Date"])
             self.From = mapfile["From"]
             self.in_reply_to = mapfile.get("In-reply-to")
-            self.body = file(self.get_path("body")).read()
+            self.body = file(self.get_path("body")).read().decode("utf-8")
         else:
             self.date = None
             self.From = None
@@ -358,7 +358,8 @@ class Comment(object):
         if not os.path.exists(self.get_path(None)):
             self.bug.rcs.mkdir(self.get_path(None))
         map_save(self.bug.rcs, self.get_path("values"), map_file)
-        self.bug.rcs.set_file_contents(self.get_path("body"), self.body)
+        self.bug.rcs.set_file_contents(self.get_path("body"), 
+                                       self.body.encode('utf-8'))
             
 
     def get_path(self, name):