TK

6Jun/110

Quicktip: UTF-8 in irssi within GNU screen

Here's a small tip to get UTF-8 to work properly in irssi running within GNU screen:

Add the following to ~/.screenrc

defutf8 on

Then start screen with the -U parameter, and start irssi.

/set term_charset utf-8
/set recode_autodetect_utf8 ON
/save

Also add the following to your ~/.bashrc, but it may not be required:

export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8

UTF-8 encoding now works, it's as simple as that. (Note for reference, I've only tested this within Terminal.app on OS X).  Next time you re-attach to this screen, remember to do so with the -UrD parameter.

TedSki on #motorcycles (EFNet IRC) came up with this solution and told me about it. Here's after the first test:


[20:37] < sgtzx> let's give it another shot
[20:37] < TedSki> sgtzx: 華語
[20:37] < sgtzx> yes, works!
[20:37] < TedSki> there ya go