This is a convenient little hack based on GNU
iconv. Unlike that utility, which converts files, TTYConv converts interactive sessions, performing lenient and error-recovering two-way conversion and taking care of other issues with interactive sessions. This means that transmission errors don't cause the converter to terminate with a decoding error (which the
iconvutility does, in the otherwise laudable interest of 100% data integrity), and the console program running will receive useful events (like window resizing).
I wrote TTYConv when I converted my entire system to UTF-8, only to realise that some of my (favourite) software, online services et cetera could not handle Unicode at all. Rather than fall back to ad hoc solutions to natively support four or five different encodings (two of which would be for Greek support alone), I'd keep UTF-8 and use a quick hack to translate from it to other encodings. Now I can do things like:
ttyconv -r CP737 -- ssh -C [email protected]
and see the full range of BBSing characters in the aging IBM 'extended ASCII' character sets, converted to the more modern UTF-8. Use a nice Unicode font (I favour Andale Mono and Lucida Console"), and you're set.
TTYConv is available as Python source (which will install on any platform Python runs) and Debian packages. It's provided under the terms of the GNU General Public License, version 2.