--- a/svv/pdf.py Thu Dec 23 19:57:55 2010 +0200
+++ b/svv/pdf.py Thu Dec 23 21:20:41 2010 +0200
@@ -212,7 +212,8 @@
"""
Format display string using context parameters
"""
-
+
+ # XXX: the canvas.drawString we use here does support unicode?
return text % dict(
column = col_title,
today = datetime.date.today().strftime("%d/%m/%Y"),
@@ -313,13 +314,11 @@
"""
Prepare a string for display by handling format codes
"""
-
- # XXX: unicode?
- return str(text % dict(
+
+ return unicode(text % dict(
today = datetime.date.today().strftime("%d / %m / %Y"),
))
-
def draw_column (self, canvas, x, y, width, title, lines, gray=None) :
"""
Draw a column in the specified position, with the specified lines of text
@@ -337,7 +336,10 @@
# lines
text.setFont(*self.COL_TEXT_FONT)
- text.textLines(self.fmt_string(lines))
+
+ # XXX: textobject's textLine fails at unicode, but textLine should work...
+ for line in lines :
+ text.textLine(self.fmt_string(line))
# draw out
canvas.drawText(text)