Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: Email::MIME support for utf8 filename

by Arik123 (Beadle)
on Dec 27, 2018 at 07:29 UTC ( #1227732=note: print w/replies, xml ) Need Help??

in reply to Re: Email::MIME support for utf8 filename
in thread Email::MIME support for utf8 filename

Does my edit (to the original post) satisfy you?

  • Comment on Re^2: Email::MIME support for utf8 filename

Replies are listed 'Best First'.
Re^3: Email::MIME support for utf8 filename
by Corion (Patriarch) on Dec 27, 2018 at 07:44 UTC

    Yes, that makes it much easier to find where the warning originates:

    The warning comes from Email::MIME::ContentType line 106:

    if ($STRICT_PARAMS and length $ct and $ct !~ /^;/) { carp "Missing semicolon before first Content-Type parameter '$ +ct'";

    So, one very simplistic workaround is to set $Email::MIME::ContentType::STRICT_PARAMS to 0 to suppress this warning.

    I don't know where/why the content type string goes awry, but that's to debug another day...

      Okay, that worked. Interestingly, it not only suppressed the warning, but also, below in the code, enabled Email::MIME to really extract the filename....

      Thanks a lot!

        I think something about that line is not strict enough for the regular expressions to match, but I don't immediately see what makes Email::MIME::ContentType dislike that line.

        Update: It seems that the handling of Email::MIME::ContentType does not like ? in the string (and the test suite does not contain anything like name="?UTF-8?foobar"). RFC 2048 allows such values (I think), so I think that this causes the bug (but I haven't written a proper test case to reproduce this). I haven't reported the issue yet, so if anybody wants to beat me to the punch (or finds the existing issue for that), feel free to open an issue yourself!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1227732]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2023-01-29 15:50 GMT
Find Nodes?
    Voting Booth?

    No recent polls found