UK Currency Symbol in 7.2 Console - A Question actually about FreeBSD

Lars Eighner luvbeastie at
Fri May 29 08:29:06 UTC 2009

On Fri, 29 May 2009, Graham Bentley wrote:

> Hello All,
> Im still struggling with this one and have tried all I could find
> by Googling lists and forums. @ and " keys are fine as are
> every other key apart from £ symbol. Can anyone suggest
> ways to track this down. At 'Login:' I can actually get £ but
> after loging I get a beep? I have tried various fonts and maps
> to no avail.
> Any suggestions / pointers, even an RT[URL]FM or useful
> flame appreciated.

All these remarks apply to the console (and virtual ttys) not xterm
or other terminals in X.

First, you must have a font with £ in it.  It seems you do if you ever see
this character, but for the record your most likely choices are iso-8859-1
and iso-8859-15 (also has the Euro symbol).  It is best to load these at
boot in three sizes:

These lines in /etc/rc.conf


will load iso-8859-1

and these


will load iso-8859-1

There are applications that will help you to edit a font, but that is beyond
the scope here.

remember, in /etc/rc.conf, when the same item is set multiple times, the
last entry wins, so it is best to read this file from the bottom and add at
the bottom.  (Do not edit the master file in /etc/defaults.)

You can see what fonts are on your system and try one out temporarily using
the vidfont command.

Second you must set your TERM variable to something compatible.  You do this
in your shell login scripts.  You can do this for everyone using the same
shell in /etc or per user in the dot file in the home directory of the user. 
Consult the man page for your particular shell.

This works for bash in /etc/profile or in the user's .profile:

export TERM

cons25l1 is for an 80x25 console using iso-8859-1.  It also appears to work
for iso-8859-15.  If you have a different number of characters (than 80) or
a different number of lines (than 25), select something appropriate from
/usr/share/misc/termcap  (there may be symbolic link to it from
/etc/termcap).  DO NOT EDIT THE TERMCAP.

Finally you need to select an appropriate keyboard from
/usr/share/syscons/keymaps and be sure it is entered in /etc/rc.conf.

Your main choices would seem to be uk.iso-ctrl.kbd and uk.iso.kbd.  Both
of these have £ at shift-3 (above the letter keys, not on the numeric

You can try out keyboards with the keymap command.

this should be in your /etc/rc.conf


(or the other one, if you choose it.  Remember, the LAST assignment to
keymap in /etc/rc.conf wins)

Keymaps are exceeding easy to edit in FreeBSD, which is one of the reasons I
use FreeBSD instead of one of the many linux distros I have tried.  If you
want to give it a try, I suggest you back it up first.

cp uk.iso.kbd uk.iso.kbd.dist

will do.

Then to use your edited map enter


Here are a few lines from uk.iso.kbd:

#                                                         alt
# scan                       cntrl          alt    alt   cntrl lock
# code  base   shift  cntrl  shift  alt    shift  cntrl  shift state
# ------------------------------------------------------------------
   000   nop    nop    nop    nop    nop    nop    nop    nop     O
   001   esc    esc    esc    esc    esc    esc    debug  esc     O
   002   '1'    '!'    nop    nop    '`'    '`'    nop    nop     O
   003   '2'    '"'    nul    nul    '@'    '@'    nul    nul     O
   004   '3'    163    nop    nop    '#'    '#'    nop    nop     O
   005   '4'    '$'    164    164    '4'    '$'    nop    nop     O
   006   '5'    '%'    nop    nop    '5'    '%'    nop    nop     O

The character code for £ is 163.  You get that from shift-3 (using the 3
from above the letter keys, not the numeric keypad).  The character code
for the Euro sign is 164.  You should be able to see that you get that from
cntrl-4.  If you had more use for that than $, you could switch them by
editing line 005 to read:

   005   '4'    164    '$'    164    '4'    '$'    nop    nop     O

If you have an edited keymap you like, keep a copy in a safe place (like
your home directory) in case it get stomped when you upgrade your system.

If you do not have root access, you can change keymaps with kbdcontrol,
and you could change fonts and video modes with vidcontrol.  (See the man
pages for each if you are interested.)  You could put these in the dot file
for your particular shell to have them take effect when you login.

You can even change these on a per-application basis by using a shell script
to launch particular applications.  This might be useful, for example, if
you had applications that do not look right without the IBM box-drawing
characters.  You could use vidcontrol in a script to switch to cp437 before
calling the application and to switch back afterwards.  Fortunately many
applications these days know what to do or can be configured to do the right
thing without such drastic measures.

Lars Eighner
8800 N IH35 APT 1191 AUSTIN TX 78753-5266

More information about the freebsd-questions mailing list