Open acli opened 4 years ago
This is going to be a challenge. trn posts articles using Pnews, but Pnews is written in sh; it’d be tricky to do QP in sh.
Note: I reread the test articles I posted on aioe.test. The post with diacritics was incorrectly read as Latin1, so this is indeed confusing the patched trn itself.
Temporary hack to make it technically semi-valid: d653d28804073e013e74963a46523d5e9e39f81f
I've fixed Pnews and Rnmail for myself. I've got a sample of how I fixed Rnmail here: https://github.com/Eli-the-Bearded/eli-mailx/blob/master/rnmail.d/Rnmail because I also use Rnmail with mailx.
My technique is a tad naive. I have a program (part of that mailx package) that tests bit patterns for UTF-8, US-ASCII, and ISO-8859-1 compliance, setting an exit code. Then I check for a charset in the header and use the appropriate test. If out of compliance it warns the user, the same way long lines warn.
So posting an article containing non-ASCII characters will produce posts that are technically invalid and will potentially cause problems with the patched trn itself (once non-UTF8 output is supported).