Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 27395
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: Nobody in particular
Requestors: rjbs [...] cpan.org
Cc: WURBLZAP [...] cpan.org
AdminCc:

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



Subject: newlines apparently incorrectly added to MIME-* encoding
Download (untitled) / with headers
text/plain 253b
This bug is described clearly by comments in a Bugzilla bug, here: https://bugzilla.mozilla.org/show_bug.cgi?id=374424#c21 The "encode"-based block introduces a newline that causes some mailers to grouse. The MIME::Words version does not. -- rjbs
Download (untitled) / with headers
text/plain 1.2k
On Sun Jun 03 09:11:05 2007, RJBS wrote: Show quoted text
> This bug is described clearly by comments in a Bugzilla bug, here: > > https://bugzilla.mozilla.org/show_bug.cgi?id=374424#c21 > > The "encode"-based block introduces a newline that causes some mailers > to grouse. The MIME::Words version does not.
I've checked bugzilla and so long as I read it, I am not sure if it is appropriate to blame it on Encode. As a matter of fact, my first implementation of MIME-Header encoding (that appered in Jcode) did not include line folding and that was denouced as a bug so I fixed it (to be more exact, I imported Ohzaki-san's fix). And Encode imported that implementation. That code has been around since 20th century and now you are calling that a bug! IMHO using Encode to encode to MIME Header is not as recommended as decoding therefrom Rember that MIME encoding is two-stage encoding so you have more than two parameters to to specify; its actual encoding AND which MIME encoding. And in this case, wether you fold the line or not. Encode's API is not very fit to fine-tune gory details. I'll leave this ticket open but until someone comes up with a "neater way to do it", I'll leave Encode as it is. Dan the Encode Maintainer
Download (untitled) / with headers
text/plain 823b
Hey Dan. It seems that Encode adds two spaces after the newline instead of just one space, which leads to things like "Don' t" when unfolded. Also, it seems to only break if there are punctuation characters at the break point--is that the intended behavior? That is, if I just have a long string without any punctuation, it doesn't seem to be broken into multiple lines at all. For example, try this: ---------- use Encode; my $str = '[Bug 2323] Here is a bug with a kind of long summary to test some' . ' stuff for rjbs to see if this thing gets split or what and' . ' how.'; my $encoded = encode('MIME-Q', $str); print "$encoded\n"; ---------- Which prints out: [Bug 2323] Here is a bug with a kind of long summary to test some stuff for rjbs to see if this thing gets split or what and how
Download (untitled) / with headers
text/plain 301b
On Sun Nov 25 20:07:47 2007, MKANAT wrote: Show quoted text
> [Bug 2323] > Here is a bug with a kind of long summary to test some stuff for
rjbs to see if this thing gets split or what and how Note that RT reformats that on display, so how it appears in the RT web interface is not actually how Encode encodes it.
Download (untitled) / with headers
text/plain 399b
On Sun Nov 25 20:09:25 2007, MKANAT wrote: Show quoted text
> On Sun Nov 25 20:07:47 2007, MKANAT wrote:
> > [Bug 2323] > > Here is a bug with a kind of long summary to test some stuff for
> rjbs to see if this thing gets split or what and how > > Note that RT reformats that on display, so how it appears in the RT > web interface is not actually how Encode encodes it.
See #40027. Dan the Encode Maintainer


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.