Re: Python 3, bad output with repr()

Lele Gaifax <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Organization Nautilus Entertainments
Message-ID <[email protected]>
Robin Becker <[email protected]> writes:

> On 28/11/2013 14:08, Lele Gaifax wrote:
> I had this issue already; it seems in their wisdom the Python Gods
> changed the behaviour of repr so that it pretty much only escapes the
> first 32 unicode points. That means all sorts of higher order
> characters that used to be encoded as 0xf7 or u2345 are now regarded
> as printable and are then pushed into strings as they are. The
> equivalent of the old behaviour is a function called ascii (or
> alternatively the %a format).

Uhm, but the strings I'm using in the given example do not contain any
fancy char, most of them are actually the empty string ('') and even
that comes out as “b''”.

Maybe the "Subject" is misleading: I'm not using repr() within my code,
but rather the PDF output contains (some) strings as if they were
processed thru repr().

Thanks&bye, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
[email protected]  |                 -- Fortunato Depero, 1929.

_______________________________________________
reportlab-users mailing list
[email protected]
http://two.pairlist.net/mailman/listinfo/reportlab-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.