Hi David,
There was a reason for only allowing decoding of UTF-8 header field
bodies. If any character set could be decoded, it would be possible
to produce header field bodies with embedded nulls, which I expect
would result in incorrect message parsing. It certainly would with
scan(1): it would truncate a Subject with an embedded null.
...
Any other suggestions? If there's an enumeration of character
encodings that can't have NULs, we could expand those.
Looking at
https://www.iana.org/assignments/character-sets/character-sets.xhtml,
I don't think these ‘Preferred MIME names’ would introduce extra NULs.
It's basically any single-byte stateless encoding which only maps NUL to
NUL.
US-ASCII
ISO-8859-{1..10,15}
Windows-1252
And many others.
--
Cheers, Ralph.