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)

Attachments
Header-newline-boundary.patch



Return-Path: <nick [...] ing-simmons.net>
Delivered-To: cpan-bug+encode [...] pallas.eruditorum.org
Received: from he304war.uk.vianw.net (he304war.uk.vianw.net [195.102.244.167]) by pallas.eruditorum.org (Postfix) with ESMTP id 4E209111BE for <bug-Encode [...] rt.cpan.org>; Tue, 30 Dec 2003 15:02:10 -0500 (EST)
Received: from [81.7.48.187] (helo=llama.ing-simmons.net) by he304war.uk.vianw.net with asmtp (Exim 4.20) id 1AbQ48-0001e2-76; Tue, 30 Dec 2003 20:02:08 +0000
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: Id: //depot/mail/tkmail#138 /Perl5.008002 Mail::Internet v1.60
CC: nick [...] ing-simmons.net
Subject: Encode::MIME::Header breaks RFC822 word and wrapping rules
In-Reply-To: <28D7CCFE-35B2-11D8-A1BD-000A95DBB50A [...] dan.co.jp> from Dan Kogai on Wed, 24 Dec 2003 10:40:31 +0900
References: <28D7CCFE-35B2-11D8-A1BD-000A95DBB50A [...] dan.co.jp>
Content-Type: text/plain; charset="UTF-8"
To: dankogai [...] dan.co.jp, bug-Encode [...] rt.cpan.org
Message-Id: <20031230200211.16998.4 [...] llama.ing-simmons.net>
Date: Tue, 30 Dec 2003 20:02:11 +0000
Sender: Nick Ing-Simmons <nick [...] ing-simmons.net>
From: Nick Ing-Simmons <nick [...] ing-simmons.net>
Reply-To: Nick Ing-Simmons <nick [...] ing-simmons.net>
Content-Length: 584
Download (untitled) / with headers
text/plain 584b
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.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
From: sava [...] blueboard.biz
Content-Type: multipart/mixed; boundary="----------=_1098208510-28415-2"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 299
Download (untitled) / with headers
text/plain 299b
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.
Content-Type: application/octet-stream; name="Header-newline-boundary.patch"
Content-Disposition: inline; filename="Header-newline-boundary.patch"
Content-Transfer-Encoding: base64
Content-Length: 422
--- 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?';
Return-Path: <dankogai [...] dan.co.jp>
X-Original-To: bug-Encode [...] rt.cpan.org
Delivered-To: cpan-bug+encode [...] pallas.eruditorum.org
Received: from dan-albook.localhost (usen-219x123x239x202.ap-US.usen.ad.jp [219.123.239.202]) by pallas.eruditorum.org (Postfix) with ESMTP id 50F9584C063 for <bug-Encode [...] rt.cpan.org>; Tue, 19 Oct 2004 17:19:44 -0400 (EDT)
Received: from [127.0.0.1] (localhost [127.0.0.1]) by dan-albook.localhost (Postfix) with ESMTP id 89EA31F42B1; Wed, 20 Oct 2004 05:56:08 +0900 (JST)
In-Reply-To: <rt-4792-24124.18.907974060781 [...] cpan.org>
References: <rt-4792-24124.18.907974060781 [...] cpan.org>
MIME-Version: 1.0 (Apple Message framework v619)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <4CA9D707-2211-11D9-8D02-000A95DBB50A [...] dan.co.jp>
Content-Transfer-Encoding: 7bit
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
X-Mailer: Apple Mail (2.619)
RT-Send-Cc:
X-RT-Original-Encoding: us-ascii
Content-Length: 613
Download (untitled) / with headers
text/plain 613b
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
MIME-Version: 1.0
In-Reply-To: <4CA9D707-2211-11D9-8D02-000A95DBB50A [...] dan.co.jp>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-21024-1169052986-1579.4792-0-0 [...] rt.cpan.org>
References: <rt-4792-24124.18.907974060781 [...] cpan.org> <4CA9D707-2211-11D9-8D02-000A95DBB50A [...] dan.co.jp>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 757
Download (untitled) / with headers
text/plain 757b
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


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.