using utf-8 in irssi under screen

Firstly, tell your local terminal application that you want a utf-8
window. This is left to you, but under macos (which I use), right click
the window, select ‘Window settings’, pick the ‘Display’ option from
the drop-down, and pick utf-8 under ‘Character set encoding’.

Next, when you start the screen session, pass the ‘-U’ flag. This has
to be passed to a new screen session – you can’t connect to an existing
one this way.

screen -U

Alternatively, you can turn on the utf-8 flag for a single existing
screen window by typing your hotkey (ctrl-a by default), then ‘:utf8 on’.
This is good if you don’t want all of your windows to be utf now.

On the remote machine, make sure that the ‘LANG‘ environment variable
is set to something UTF-8 like, for instance, I use

export LANG=en_GB.UTF-8

in my .bashrc.

Finally, you need to tell irssi to use UTF-8. Start it up in your new
utf-8 window, and type

/set term_type utf-8

Hopefully everything should work now.

More UTF8 pain

Does no-one in the world care about non-ASCII characters? It’s pathetic. I’m trying to make HTML form uploads work for files with non-ASCII characters in their names, and I’m hitting the stupidest problems.

The main bugbear is mozilla – you can’t upload files with wide characters in their names. At all. Piece of shit. Safari seems to be encoding the upload filenames with some made-up encoding that I can’t figure out, so that’s out of luck. At least safari sends the actual contents of the files.

The one browser I’ve tried that works flawlessly is Internet Explorer. Microsoft, at least, seem to care about the non-US market.

UTF8 Openguides

I foolishly offered to make OpenGuides UTF-8 safe. Because I don’t do that enough at work, or something. Anyway, it’s going quite well – because I did all the grunt work in CGI::Wiki a while ago, it’s just a matter of finding all the inputs and outputs and making sure they’re encoded properly. So far, the page contents and names are utf-8 safe, along with the cookie preferences, so your username is good. The search stuff looks scary, and there are various broken plugins, etc, etc, so there’s still stuff to do. I should also do the hooks properly – CGI::Wiki should offer nice functions for this stuff.