Setting UTF8 as default in FreeBSD shell & screen, useful for irssi

This is mostly for my own reference.
Running irssi with UTF8 will produce garbage characters unless screen, shell and terminal(not documented here, most terminals use utf8 nowadays though) is also set to UTF8.

The commands below will fix it, assuming you use bash.

script type="text/javascript">

# echo "export LANG=en_US.UTF-8" >> ~/.bashrc
# echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc
# echo "export LC_CTYPE=en_US.UTF-8" >> ~/.bashrc
# echo "export MM_CHARSET=utf8" >> ~/.bashrc
# echo "defencoding utf8" >> ~/.screenrc
# echo "encoding utf8 utf8" >> ~/.screenrc

Make sure you use -U when you reattach screen, like screen -Udr.






This entry was posted in FreeBSD and tagged , , , . Bookmark the permalink.
  • JuanPablo AJ

    this fix my screen with utf8, thanks