develooper Front page | perl.perl5.porters | Postings from December 2003

Re: [cpan #4792] Encode::MIME::Header breaks RFC822 word and wrapping rules

Dan Kogai
December 31, 2003 04:33
Re: [cpan #4792] Encode::MIME::Header breaks RFC822 word and wrapping rules
Message ID:
On Dec 31, 2003, at 05:02, Nick Ing-Simmons via RT wrote:
> 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.

Please.  I also consider Encode::MIME::Header clumsy.  IMHO RFC2047 is 
even more so :)  One of the reasons Encode::MIME::Header is not so 
elegant is that RFC2047 is a double-encoding, which does not suit well 
on Encode APIs.  For instance, encode("MIME-Header") always uses UTF-8 
for its "primary" encoding (though it accepts all other encodings that 
Encode can grok when decoding).  Of course it's possible to implement 
encode("MIME-Header-utf8") and such but I don't want to tweak Encode 
"core" just for the sake of MIME Header....

Anyway, codes are always welcome.

Dan the Encode Maintainer Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About