Closed xunam closed 4 years ago
Come to think of it, why not use .mailcap
in the first place ? It provides the same functionality as bower's open_part
and filter
configuration but in a way that is already well established and thought out. It is certainly some work to implement it but there might be libraries for that.
The obvious thing would be to pass the content-type and charset through environment variables. Rather not deal with mailcap.
indeed, that seems to be the right solution assuming mailcap is not used (which can be argued for).
The environment variables are PART_CONTENT_TYPE and PART_CHARSET.
Hello,
Message parts that are sent to external filters are sent without charset conversion but there seems to be no way to inform the filter of the charset it receives.
Consequence: filtering a
text/html
part in ISO-8859-1 through Pandoc makes it crash, since it only accepts UTF-8 input, and there is no way toiconv
the data first to fix this.