Matthew Johnson

Page Body


UTF8ify your IRC—For Fun and Profit!

How to setup irssi + screen to do utf8

Everything which the text passes through between irssi and your screen which does any interpretation of the characters needs to understand about utf8. This is generally: irssi, screen, the shell in which screen & irssi are running on the server, and the shell/terminal you are using on your client. Things like ssh don't inspect the data, and hence don't care.

The Server

The server (or more correctly shells running on the server) need to understand utf8. This is set using the locale. If you run locale you will probably see lines like LC_CTYPE="C" or LANG="POSIX" which is generally the linux default. If you see this you should add the line export LANG=en_GB.UTF-8 to your shell's startup file (often ~/.bashrc). You will now need to log out and back in. Check that the locale is now correct.

Irssi

In irssi you enable utf8 (needed for multi-byte character input) with /set term_charset utf-8.

Screen

You may have to restart screen to enable utf8. Starting the screen with screen -U enables utf8 in a new screen, it may be possible to turn it on in an existing screen with ^A:utf8, success has been mixed with this approach.

Your computer

Finally, you need to make sure that your computer understands utf8. If you are running Linux then the steps described on the server can be repeated here, check the output of locale and change it if necessary. The system-wide locale can be changed on Debian systems with dpkg-reconfigure locales.

If you are using PuTTY on windows to connect then you have to change an option before connecting. On newer versions of PuTTY this can be found under Window -> Translation in the menus.

«Sü©€ss»!!

You should now be able to type a whole new range of characters (like those above if your browser is doing utf8 correctly). Test this by copying this heading into your IRC.