[reportlab-users] Bogus Character

Jessup, David DJESSUP at usnews.com
Tue Sep 23 15:44:47 EDT 2008


Use:

from xml.sal import saxutils
...
my_paragraph = Paragraph(saxutils.escape(my_text), style)

The escape function will encode the special characters in your text (&
-> &, etc.) so that Paragraph can understand it.

________________________________

From: reportlab-users-bounces at reportlab.com
[mailto:reportlab-users-bounces at reportlab.com] On Behalf Of Tiago Becker
Sent: Tuesday, September 23, 2008 3:21 PM
To: reportlab-users at reportlab.com
Subject: [reportlab-users] Bogus Character


Hello all,
I've an error if a Paragraph contains some characters such as "&".

Is there a way to fix that other than replacing the character?

Thanks!

Tiago Becker

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20080923/7c2c0318/attachment.htm>


More information about the reportlab-users mailing list