Home - acli/trn GitHub Wiki

UTF-8–patched Threaded Read News (trn)

This is still a work-in-progress but I’m already using it to read some mailing lists (UTF-8; some in HTML) and some fr.* groups (mostly UTF-8, some ISO-8859-15, a little Windows-1252 – very little if any ISO-8859-1 that I can see).

This version supports only UTF-8 output, but supports posts in UTF-8, ISO-8859-1, ISO-8859-15 and Windows-1252.¹ The original “character set” conversions (TeX, ISO-8859-1-to-ASCII) assume most displays are ASCII (or DBCS ², for example, or some other character set that isn’t Latin1); they have been disabled in the process of retrofitting it with UTF-8 support.

In theory, on a modern system such as Linux it’s not difficult to make it support other character sets once it supports UTF-8; but trn should probably be made to work on a system with no iconv. For context, it doesn’t even use curses, but bare termcap/terminfo ³ (and calls it by a name I’ve never heard of); the code is still written K&R style; it does not even believe in enums.

Note: I did this because I found reading mailing lists way too painful. I set up INN and tried three different newsreaders just to figure out a way to read all those mailing lists in a less painful way. When I got trn up I didn’t even know AIOE exists, and I found trn didn’t quite work because all those lists were in UTF-8.

Article selector for a local newsgroup gated from number of mailing lists. Even posts that are in English have smileys.

Plain-text UTF-8 article from W3C’s public-html-ig-zh mailing list. Lines are wrapping correctly even for double-width characters that are three bytes wide.

Article selector for fr.lettres.langue.francaise. Subject headings align even though some author names contain single-width non-ASCII characters that are two bytes wide.

Plain-text ISO-8859-15 article from fr.lettres.langue.francaise. Indicator at bottom left shows a conversion has been performed.


  1. That is, everything needed to read fr.*. When I finally figure out if Chinese/Japanese groups still exist I might find more urgency to support other character sets.
  2. The likes of Big5, EUC-JP, Shift_JIS, etc.
  3. We could argue that bare termcap/terminfo is more accessible (in the sense that it plays nicer with accessibility software), though.
⚠️ **GitHub.com Fallback** ⚠️