[reportlab-users] encoding errors

Robin Becker robin at reportlab.com
Tue Jan 23 06:39:05 EST 2007


Dirk Holtwick wrote:

> Hi,

>

> and here I got another error while trying to set a BaseDocTemplate

> "title", "author" and "subject" as Unicode with German umlauts:

>

> error in line 0: Traceback (innermost last):

> File "c:\work\pisa\sx\pisapro\pml.py", line 365, in __init__

> self.doc.build(self.story.pop())

> File "C:\work\reportlab\reportlab\platypus\doctemplate.py", line 749, in build

> self._endBuild()

> File "C:\work\reportlab\reportlab\platypus\doctemplate.py", line 698, in _endBuild

> if getattr(self,'_doSave',1): self.canv.save()

> File "C:\work\reportlab\reportlab\pdfgen\canvas.py", line 870, in save

> self._doc.SaveToFile(self._filename, self)

> File "c:\work\reportlab\reportlab\pdfbase\pdfdoc.py", line 215, in SaveToFile

> f.write(self.GetPDFData(canvas))

> File "c:\work\reportlab\reportlab\pdfbase\pdfdoc.py", line 230, in GetPDFData

> self.info.digest(self.signature)

> File "c:\work\reportlab\reportlab\pdfbase\pdfdoc.py", line 1337, in digest

> md5object.update(str(x))

> UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 17: ordinal not in range(128)

>

> Yours Dirk

>

.......

just carping won't make any friends, but bug reports are welcome :)

Anyhow what were the actual string/unicode values that were used for the three?
I know we've done Japanese for this so it should be possible to get it working.
--
Robin Becker


More information about the reportlab-users mailing list