German keymap not working
olli at lurza.secnetix.de
Tue Jun 19 09:09:22 UTC 2007
Raven <Tuscan at t-online.de> wrote:
> Oliver Fromme wrote:
> > Tory wrote:
> > > This might be trivial, but I can't find out what's wrong.
> > > I rebuild world / kernel daily, and since last week German Umlauts don't
> > > work anymore.
> > > Not on the console and not in X.
> > > I tried different keymaps and manual edits.
> > > The values are ok, but Instead of ä ü ö (pasted) I get ? ? ÷ - or
> > > nothing at all.
> > What are your locale settings? i.e. what's the output
> > from this shell command: env | egrep 'LC_|LANG'
> That's the weird thing, the output of env | egrep 'LC_|LANG' reads:
> but that can't be right, since I get a slash when pressing shift-7 and
> the german ß works as well.
You are confusing a few things here.
The locale settings (LANG, LC_*) specify the character set
type, i.e. which characters are valid letters etc.
They have _nothing_ to do with your keyboard mapping.
The keyboard mapping is set via "keymap=" in /etc/rc.conf
(I have set it to keymap="us.iso-latin1" which is a self-
made mapping based on an US keyboard with additional
German umlauts and other useful things from the latin1
set). You can also set it interactively with the kbdmap
tool, or with the kbdcontrol command line tool.
Of course, the above is for syscons (text console) only.
For X11 there are separate ways to configure the keymap.
> Almost all keys work as they are supposed to with a german keymap , I
> only can' t get" ä ö ü @ " (pasted).
In order to be able to use German umlauts correctly, set
LC_CTYPE=de_DE.ISO8859-1 (or -15). I recommend not to
set LANG and LC_ALL at all, because they override every-
thing else and might have undesired side effects. Only
set the specific variables that have the effect that you
want. See the environ(7) and setlocale(3) manualpages
Furthermore you should have configured the correct keyboard
mapping that you want, i.e. US or German (or your own).
Personally I always use my modified US mapping, no matter
whether I'm sitting in front of a US, German or Russian
keyboard. You look at the screen while typing anyway, not
at the keys. ;-)
Finally, of course you also must use a font that contains
the characters that you want, i.e. an ISO8859-1 or -15
font. I assume you already have that, because you can
obviously paste the characters and seem them correctly.
So it's only an input problem, not a display problem.
If you still can't fix it, try to find out if it's related
to your shell. Does the problem persist when you use a
different shell, or when you simply use the command
/bin/cat? If it's a shell problem, it might be related
to your environment variables, as explained above. What
shell are you using anyway?
If it's not the shell, then maybe it's simply a hardware
problem, i.e. your keyboard is broken. (What kind of
keyboard? USB, PS/2? Does the problem persist if you
use a different keyboard?)
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"And believe me, as a C++ programmer, I don't hesitate to question
the decisions of language designers. After a decent amount of C++
exposure, Python's flaws seem ridiculously small." -- Ville Vainio
More information about the freebsd-current