[reportlab-users] A jerkwater bug in 'reportlab/platypus/paragraph.py'

Robin Becker robin at reportlab.com
Wed Jun 18 08:20:41 EDT 2008


张昆张昆 wrote:

> Hello everybody

>

> Thanks for this greateful project. Today i find a jerkwater bug in paragraph.py.

>

> Line 412-413:

>

> if type(link) is unicode: link = unicode.encode('utf8')

>

> I think it should like below, but i'm incertitude:

>

> if type(link) is str: link = link.encode('utf8')

>

> Thanks and best regards,

> Timesong




I think this is a bug and it probably should read

if isinstance(link,unicode): link = link.encode('utf8')

later on(in more uncodely friendly times) it might get turned around and then be

if isinstance(link,str): link = link.decode('utf8')


--
Robin Becker


More information about the reportlab-users mailing list