$decode() halts when it hits a character that isn't part of the base64 set. This contradicts the base64 section of the MIME RFC (section 6.8) which states that they should be ignored. This causes a lot of interoperability issues since another part of the base64 section directs that base64-encoded output should be longer than 76 characters-per-line, meaning most base64 encoded output contains a whole load of CRLFs.


Spelling mistakes, grammatical errors, and stupid comments are intentional.