[reportlab-users] Bogus Character

Jessup, David DJESSUP at usnews.com
Tue Sep 23 15:55:12 EDT 2008


Ack!

That should be: from xml.sax import saxutils
^

________________________________

From: reportlab-users-bounces at reportlab.com
[mailto:reportlab-users-bounces at reportlab.com] On Behalf Of Jessup,
David
Sent: Tuesday, September 23, 2008 3:45 PM
To: Support list for users of Reportlab software
Subject: Re: [reportlab-users] Bogus Character


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



More information about the reportlab-users mailing list