Fixing character encoding with irssi and screen

Yes, this old chestnut. Time and again I forget the steps to get a new (Debian-ish) system working properly such that I can ssh in and reattach to a screen’d irssi session and have character encoding work properly. That is, I can enter a £ sign and it doesn’t come out like I just swore at the channel.

Probably one of the simplest guides is by Salvatore Iovene, from which I summarise the following steps:

  1. sudo dpkg-reconfigure locales
  2. start screen with -U
  3. Add some options to the irssi configuration

For that last part, I think I worked out which stanza the config should go in:

settings = {
  core = {
    recode = "yes";
    recode_autodetect_utf8 = "yes";
    recode_fallback = "UTF-8";
    recode_out_default_charset = "UTF-8";
    recode_transliterate = "yes";
  };
  "fe-common/core" = {
    term_charset = "UTF-8";
  };
};
This entry was posted in linux. Bookmark the permalink.

Comments are closed.