Utf8 unicode bash screen irssi

From TykWiki
(Redirected from Utf8 bash screen irssi)
Jump to navigationJump to search

Background

I am very fond of using irssi running in a screen as IRC client. I am on a wide range of IRC channels ranging from personal channels with friends to a bunch of opensource project channels. Some IRC channels I am in have a lot of UTF-8 unicode content, for example #musicbrainz on Freenode.

This page is how I remember what to configure to get UTF-8 working in irssi in screen on FreeBSD :)

Bash

First of all, the shell (of course). Bash needs to be sorted before anything else. If I cannot type in æøå into bash without weird sideeffects, I cannot expect it to work inside screen/irssi.

The following lines in ~/.bash_profile make bash behave properly with UTF-8:

export LC_ALL=da_DK.UTF-8
export LANG=da_DK.UTF-8

With a properly configured SSH client (see below), this is all I need to be able to enter Danish characters (or paste arabic or chinese UTF-8 text from wikipedia) into bash. Not that that in itself is very useful, but still :)

Screen / Irssi

I haven't touched my screen or irssi config to make this work. After bash got sorted it all just kindof worked. Specifically, I do not start screen with -U which I otherwise thought I had to, based on the following snippet from the screen man-page screen(1):

       -U   Run screen in UTF-8 mode. This option tells screen that your  ter-
            minal sends and understands UTF-8 encoded characters. It also sets
            the default encoding for new windows to `utf8'.

Clients

PuTTy

When using PuTTy as SSH client I also go to Window -> Translation and set Received data assumed to be in which character set dropdown to UTF-8.