[reportlab-users] Pb with Legend and unicode

Robin Becker robin at reportlab.com
Mon Feb 26 12:07:26 EST 2007


Robin Becker wrote:

> philippe makowski wrote:

>> Hello,

> ........

>> File utf_8.py, line 16, in decode

>> return codecs.utf_8_decode(input, errors, True)

>> UnicodeDecodeError : 'utf8' codec can't decode bytes in position 2-4 : invalid data

>>

>> Any Clue ?

>> (I'm a beginner in Python)

> ........

>

> this is probably a bug. We're supposed to allow for utf8 encoded strings or

> unicode everywhere. I'll take a look when I get time.


I just tried utf8 encoded string and that works for me. Unfortunately the
unicode fails and that is a bug.

As a workaround for now you can use

unicode('Créations','iso-8859-1').encode('utf8')

unfortunately we had to choose one encoding for the string values and utf-8 does
pretty well everything that unicode does so that got chosen.
--
Robin Becker


More information about the reportlab-users mailing list