develooper Front page | perl.pep | Postings from January 2012

Re: backwards incompatible asciihood change in Email::Address

Thread Previous
From:
Ruslan Zakirov
Date:
January 15, 2012 16:02
Subject:
Re: backwards incompatible asciihood change in Email::Address
Message ID:
CAMOxC8smQZneUer3M6TZzYU84Pt+aHzRx-vcuqeDD2=3fsiFSg@mail.gmail.com
On Sun, Jan 15, 2012 at 22:13, Ricardo Signes <perl.pep@rjbs.manxome.org> wrote:
> * Ruslan Zakirov <ruz@bestpractical.com> [2012-01-15T10:24:59]
>> On Sun, Jan 15, 2012 at 19:09, Ricardo Signes <perl.pep@rjbs.manxome.org> wrote:
>> > I've updated Github's repo with a change to only reject non-ASCII in the
>> > email address, which really is a problem.  My guess is that you were having
>> > a problem with the decoded phrase legally containing non-ASCII.
>>
>> Right guess. Is it legal? I don't think it is legal according to the
>> spec to have non-ascii phrase. As far as I recall it should be encoded
>> with Q/B.
>
> Sure, but people aren't (I hope) passing the mime-header-encoded content to
> ->parse.  That will parse, but give you crap.  They should be passing the
> decoded character string, at which point the non-ASCII phrase is legal.

Good to know this.

> i.e., Email::Address parses the header's decoded character data, not its raw
> encoded data.

May be at some point we should release E::A::Liberal that parses
encoded string to E::A objects. We saw mails where phrase wrapped into
two " (""Ivan Ivanov"" <...>), Q/B used to hide comas and other
characters (Ivanov, Ivan <...> with phrase encoded), probably code and
tests can show more cases.

>
> I will make a release in a few hours.

Thanks.

>
> --
> rjbs

-- 
Best regards, Ruslan.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About