Le 07.12.2010 22:53, Ivan Paponov via RT a écrit :
Show quoted text> Tue Dec 07 16:53:53 2010: Request 63716 was acted upon.
> Transaction: Ticket created by ivan.paponov@gmail.com
> Queue: MsOffice-Word-HTML-Writer
> Subject: encode_qp issue
> Broken in: (no value)
> Severity: (no value)
> Owner: Nobody
> Requestors: ivan.paponov@gmail.com
> Status: new
> Ticket<URL:
http://rt.cpan.org/Ticket/Display.html?id=63716>
>
>
> Hi,
>
> I faced with one problem in MsOffice::Word::HTML::Writer.
> When I'm trying to add long string, I have problems with line breaks.
> Equal sign (=) and line break is added after each 76 chars of string).
>
> Why I need long strings?
> I'm using google charts api, And I'm providing quite long url to<img
> src='.......'>
> And encode_qp corrupts that url, making chart rendered with errors.
>
> I checked MIME::QuotedPrint::encode_qp docs, and found that:
> "it is also used for additional soft line breaks to ensure that no line end
> up longer than 76 characters"
> But I figured out that you can avoid those soft line breaks if you will call
> encode_qp( $str, '')
> Will it work for MsOffice::Word::HTML::Writer?
>
>
> Thanks.
>
Breaking lines with a '=' followed by \n is part of the MIME standard,
and as far as I know MsWord does understand it. I have many generated
documents where lines are longer than 76 chars; encode_qp indeed does
break those lines, but when opening those docs in MsWord there is no
problem.
Encoding through encode_qp(str, ''), as you suggest, seems to work as
well (MsWord does not complain about long lines); but before modifying
the code I would like to be sure that this is really the cause of your
problem. Please do a s/=\n//g on your doc, and see if it opens properly.
If possible (not confidential), please also attach your doc to the
ticket so that I can see the problem.
Thanks in advance, Laurent Dami