I have posted my question about unicode chars also to reportlab.

I have some answers. Any comment?

 

                Marco [dot] Parenzan [at] libero [dot] it

 

------------------------------

 

Message: 4

Date: Thu, 20 Aug 2009 10:10:49 +0100

From: Robin Becker <[email protected]>

Subject: Re: [reportlab-users] IronPython and ReportLab

To: Support list for users of Reportlab software

      <[email protected]>

Message-ID: <[email protected]>

Content-Type: text/plain; charset=ISO-8859-1; format=flowed

 

Marco,

 

in CPython reportlab we expect all strings to be either bytes in utf8
encoding 

or unicode. I suspect that the default string encoding in ironpython is 

something other than that so a lot of reportlab string handling may be
broken.

 

Does ironpython support unicode directly ie u'Hello World'?

 

I would not expect reportlab to work out of the box with ironpython. PDF
doesn't 

use unicode (normally) and most of the output is in Adobe specific
encodings.

 

I don't think the real problem lies in our use of strange bytes (although
that 

may not help). If the string in question is the special sequence we use at
the 

beginning of the document then the issue is deeper since that string doesn't


normally require any special manipulation (ie we expect it to appear
literally 

in the output as a sequence of bytes). If we are unable to write bytes
directly 

to a file then many other problems will also need to be found and fixed.

 

This problem also arises in Python 3.x so may eventually be solved for you.

 

As to why reportlab takes so long to execute I cannot say.

-- 

Robin Becker

 

 

------------------------------

 

Message: 5

Date: Thu, 20 Aug 2009 21:20:25 +1200

From: Tony Meyer <[email protected]>

Subject: Re: [reportlab-users] IronPython and ReportLab

To: Support list for users of Reportlab software

      <[email protected]>

Message-ID:

      <[email protected]>

Content-Type: text/plain; charset=ISO-8859-1

 

(For context, I've only ever used ReportLab with CPython.  I do use

IronPython for other things, though).

 

> Does ironpython support unicode directly ie u'Hello World'?

 

Yes.  IronPython is like Python 3.x in that there are only unicode

strings (`str is unicode` evaluates to True).

 

> As to why reportlab takes so long to execute I cannot say.

 

IronPython is faster than CPython with some things, but CPython is

much, much faster at starting up than IronPython.  I suspect that

Marco is just seeing the regular slow startup of IronPython.

 

Cheers,

Tony

 

 

_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to