Skip Menu |

This queue is for tickets about the Encode CPAN distribution.

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

People
Owner: DANKOGAI [...] cpan.org
Requestors: nick [...] ing-simmons.net
Cc:
AdminCc:

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



CC: nick [...] ing-simmons.net
Subject: Encode::MIME::Header breaks RFC822 word and wrapping rules
To: dankogai [...] dan.co.jp, bug-Encode [...] rt.cpan.org
Date: Tue, 30 Dec 2003 20:02:11 +0000
From: Nick Ing-Simmons <nick [...] ing-simmons.net>
Dan Kogai <dankogai@dan.co.jp> writes: Show quoted text
> >Dan the Encode Maintainer
Which reminds me. Encode::MIME::Header's encode methods have a number of snags - at least as I was using them. As I remember the issue it has to do with line-wrapping and what is considered a "word". RFC2047 uses RFC822 definitions of word/atom etc. and there are some complicated rules. I am growing my own RFC2047 encode routines for now (to understand all the rules). But it would be nice to merge them back into Encode::MIME::Header someday. I am sending this mail so I can bookmark it as a reminder.
From: sava [...] blueboard.biz
One of the broken rules is quite simple to fix - RFC 2047 states that "If it is desirable to encode more text than will fit in an 'encoded-word' of 75 characters, multiple 'encoded-word's (separated by CRLF SPACE) may be used" but Encode::MIME::Header separates them only with LF. Patch is attached.
--- Header.pm 2004-08-05 13:29:40.000000000 +0300 +++ Header.fixed.pm 2004-10-19 20:53:48.853428696 +0300 @@ -129,7 +129,7 @@ push @line, join("\n " => @subline); } $_[1] = '' if $chk; - return join("\n", @line); + return join("\r\n", @line); } use constant HEAD => '=?UTF-8?';
CC: via RT <bug-Encode [...] rt.cpan.org>
From: Dan Kogai <dankogai [...] dan.co.jp>
Subject: Re: [cpan #4792] Encode::MIME::Header breaks RFC822 word and wrapping rules
Date: Wed, 20 Oct 2004 05:56:08 +0900
To: SAVA [...] cpan.org
RT-Send-Cc:
On Oct 20, 2004, at 02:55, via RT wrote: Show quoted text
> This message about Encode was sent to you by SAVA <SAVA@cpan.org> via > rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=4792 > > > One of the broken rules is quite simple to fix - RFC 2047 states that > "If it is desirable to encode more text than will fit in an > 'encoded-word' of 75 characters, multiple 'encoded-word's (separated by > CRLF SPACE) may be used" but Encode::MIME::Header separates them only > with LF. Patch is attached.
So where is the patch? Dan the Encode Maintainer
On Tue Oct 19 17:19:51 2004, dankogai@dan.co.jp wrote: Show quoted text
> On Oct 20, 2004, at 02:55, via RT wrote:
> > This message about Encode was sent to you by SAVA <SAVA@cpan.org> via > > rt.cpan.org > > > > Full context and any attached attachments can be found at: > > <URL: https://rt.cpan.org/Ticket/Display.html?id=4792 > > > > > One of the broken rules is quite simple to fix - RFC 2047 states that > > "If it is desirable to encode more text than will fit in an > > 'encoded-word' of 75 characters, multiple 'encoded-word's (separated by > > CRLF SPACE) may be used" but Encode::MIME::Header separates them only > > with LF. Patch is attached.
> > So where is the patch? >
The patch is probably only visible in RT (It is really there). Regards, Slaven