I see things like =?iso8859-1?B?...?= in email addresses. I assume this is defined in some RFC. Can anybody explain where? Is this supposedly obsolete now when everything is Unicode?
2 Answers
This is the RFC 2047 "Encoded word" format used in MIME format email messages (i.e. basically all of them) to fit 8-bit data into 7-bit ASCII. It has nothing to do with HTTP GET or query strings.
Encoded-word is to headers as Content-Transfer-Encoding is to the message body – both use Base64 or Quoted-Printable formats to convert 8-bit data to 7-bit ASCII data, and both are normal occurrences in messages.
However, normally you should never see such encoded text in your mail app (except by viewing the message source) – it should always be shown decoded in the UI. If the mail app shows you the raw encoded-word, then most likely it couldn't be decoded correctly (e.g. sender specified the wrong character set).
This format is not obsoleted by Unicode; it achieves a different task and is equally applicable to all character sets. Indeed you will frequently see Unicode text getting encoded as =?utf-8?....
However, it may be obsoleted by the SMTP "8BITMIME" extension. Like many email things it comes from an era where some networks were not "8-bit clean" and could discard or mangle the value of the high bit – something that's no longer true for modern SMTP software running over TCP/IP.
- 426,297
- 64
- 894
- 966
Most likely, this is a generated email from software with either a misconfigured plugin or a poorly written one. The "=" and "?" probably indicate that GET parameters are being passed (and misinterpreted/misarranged) in a function somewhere.
See for example: ( https://magento.stackexchange.com/questions/37663/plugin-email-sender-incorrectly-uses-iso-8859-1 ) where the OP quotes a similar mangling based upon a bug.
From: =?iso-8859-1?Q? (...) = address@example.com
- 4,166
- 1
- 11
- 16
-
Ok, but I am not yet convinced. Balanced pairs do not seem to indicate parameters. – Tomas By Jan 20 '21 at 22:31
-
The takeaway here is the bug in whatever they are using. The parameters having anything to do with GET is mere speculation. – Yorik Jan 20 '21 at 22:35
-
As far as I can tell, the bug report isn't talking about the encoding being used in general, it's talking about the encoding having the wrong charset filled in (i.e. Magento outputting `=?iso8859-1?` when it should have output `=?utf-8?`). – u1686_grawity Jan 20 '21 at 22:37
-
No, it is rendering garbled text. almost exactly as the OP describes – Yorik Jan 20 '21 at 22:40