[SLUG] accented characters

Gavin Baker gav at supercowpowers.org
Wed Nov 24 00:43:59 GMT 2004


On Tue, 2004-11-23 at 13:02 -0500, john at johnallsopp.co.uk wrote:

> How do I type accented characters?

¿de ésta forma? Así escribí esta oración con maña. Es fácil y sin ratón.

> In windows, for n with a ~ on top, I used to hold alt and, on the
> numeric pad, type 241, then release the alt.

You need to lookup the character code before you can type it?

Linux uses a "Compose" key, both in the console, and under X. To get a ñ
you press the Compose key, then press "n", then press "~". (In the
console, the "~" would come before the "n"). 

All other characters are similar. ç = compose "c" ",". æ = compose "a"
"e". ó = compose "o" "'" etc...

This may or may not be set up already by your distro.

> It dusnae work in gedit nor open office.
> 
> Having said that, gedit is displaying correctly those I've previously
> typed.

If it doesn't work, here are a few things that will help with
google.com/linux ...

Make sure your font contains the characters you want to see (Yours does
already).  (Gnome and KDE come with apps to look at your fonts character
set, and there are desktop neutral others). For the console, the lat9*
fonts are pretty good (check the manpage for "setfont").

Set the locale X uses ("echo $LANG"). I use en_GB.UTF-8, but the
ISO-8859-15 ones will be fine too. I don't know where redhat 9 sets
this. It maybe in your display manager config (check under /etc/X11),
or /etc/environment or /etc/profile. It might work if you set it in
~/.profile or ~/.xprofile too. Google will know.

The gnome display manager (gdm) lets you set this on the login screen.

Find/Set the Compose key. 

X calls it "Multi_key", so "xmodmap -pke | grep Multi_key" will show
what X is using. Pressing keys while "xev" is running will show the raw
keycodes for your keyboard. Again, I don't know where to set this
globally on redhat 9, but google will. You can probably override the
default with a ~/.Xmodmap too...

Gnomes' "keyboard preferences" let you set this too, along with other
things.

The console calls it "Compose". You can see the raw keycodes in a
console with "showkeys", and set it by editing the keymap your currently
using (they live in /usr/share/keymaps and will be set in /etc
somewhere).

Regards,
Gav






More information about the Scarborough mailing list