pavement

Unicode

From FreeBSDwiki
Revision as of 08:56, 27 September 2007 by Ice (Talk | contribs)
Jump to: navigation, search

Contents

Unicode

Descriptive text what unicode / utf-8 is.

Using UTF-8 in FreeBSD

First we need to set the LC_ALL and LANG variables, find out which locales can support UTF-8.

cd /usr/share/locale/; ls *UTF-8 -d

Add the following environment variables to the appropriate file, ~/.profile or ~/.login or ~/.bashrc.

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

Now login and logout to have the effects apply.

Applications

xterm

To make xterm play nice i added

echo "xterm*locale: UTF-8" >> ~/.Xdefaults

irssi + screen

If you're like me and don't want to restart your irssi you use the following line, otherwise screen should use the locales.

Ctrl-a : (colon) then write 'encoding UTF-8 UTF-8'

This config will enable you to send ISO8859-1 by default in irssi.

/set term_charset UTF-8
/set recode_out_default_charset ISO8859-1
/set recode yes
/set recode_autodetect_utf8 no
/set recode_fallback ISO8859-1
/set recode_transliterate no
/recode add #utf8channel UTF-8

External Links

Personal tools