|Keep It Simple, Stupid|
Re: MIME::Base64 is broken in 5.8.2?by MADuran (Beadle)
|on Jan 19, 2004 at 20:50 UTC||Need Help??|
I duplcated the behavior on AS Perl 5.8.2 Win 2K. And a quick (very quick) look over of RFC 3548 seems to say it is broken. But I did this:
I got this back:
and so worked around it.
I wonder if it is in the *NIX version of 5.8.2/5.8.3??
Update: The MIME spec allows CRLF characters in Base64:
As quoted in Above RFC: "Implementations MUST reject the encoding if it contains characters outside the base alphabet when interpreting base encoded data, unless the specification referring to this document explicitly states otherwise. Such specifications may, as MIME does, instead state that characters outside the base encoding alphabet should simply be ignored when interpreting data ("be liberal in what you accept").
Note that this means that any CRLF constitute "non alphabet characters" and are ignored. Furthermore, such specifications may consider the pad character, "=", as not part of the base alphabet until the end of the string. If more than the allowed number of pad characters are found at the end of the string, e.g., a base 64 string terminated with "===", the excess pad characters could be ignored."