nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] General question - unsupported charset conversion

2014-02-28 16:31:32
Look, software cannot read minds.  People would like it to, but I don't
work for the NSA, so I don't buy into that concept.  We have standards.
For a reason.  To eliminate ambiguity.  MIME has been around for how
many years now?  There is no excuse in this day and age for any software
to generate syntactically incorrect MIME content.

Here's the case I'm thinking about:

- You're running in an ISO-8859-1 locale.  This is permitted, no one questions
  this.
- You get a MIME message that contains the following header:

Content-Disposition: attachment; filename*=UTF-8''%F0%9F%92%A9.jpg

  This is a perfectly valid MIME header, formatted correctly by the MIME
  standards.  There is no ambiguity here, no brain damage.  Everything's
  above-board.

What, exactly, should I do with this MIME parameter?  When you decode
that and feed that to iconv() to convert it from UTF-8 to ISO-8859-1,
you're going to get EILSEQ as an error.  But this is not the sender's
fault; they followed the rules (that's assuming I did the MIME
formatting correctly; I was doing it by hand.  Pretend that I got it
right, for the sake of this discussion).

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>