Skip Menu |

This queue is for tickets about the MsOffice-Word-HTML-Writer CPAN distribution.

Report information
The Basics
Id: 63716
Status: resolved
Priority: 0/
Queue: MsOffice-Word-HTML-Writer

People
Owner: Nobody in particular
Requestors: ivan.paponov [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: encode_qp issue
Date: Wed, 8 Dec 2010 00:53:43 +0300
To: bug-MsOffice-Word-HTML-Writer [...] rt.cpan.org
From: Ivan Paponov <ivan.paponov [...] gmail.com>
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. -- Best regards, Ivan Paponov ivan.paponov@gmail.com
Subject: Re: [rt.cpan.org #63716] encode_qp issue
Date: Wed, 08 Dec 2010 02:17:58 +0100
To: bug-MsOffice-Word-HTML-Writer [...] rt.cpan.org
From: laurent dami <laurent.dami [...] free.fr>
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
Le Mar 07 Déc 2010 16:53:53, ivan.paponov@gmail.com a écrit : Show quoted text
> But I figured out that you can avoid those soft line breaks if you
will call Show quoted text
> encode_qp( $str, '') > Will it work for MsOffice::Word::HTML::Writer?
OK, MsWord seems to be happy with that change, so I implemented it in v0.07 (just published to CPAN). Sorry for the delay.