Can't have accented characters

Hi,

I just installed FreeBSD 7.3 (canned distribution "All"), and I managed to configure X. TWM comes up fine. I fiddled with various keyboard layouts in xorg.conf (french, german, swiss french), and it sort of works, except I don't have any special characters, e. g. é, à, à, ö, ä, ü and the likes.

I'm a long-time Linux user since Slackware 7.1, but completely new to FreeBSD (nobody's perfect :e). I wonder if there's some additional step to take for having correct special chars, like installing special fonts or the likes.

One other detail: in the console (where I defined a swiss french keyboard) I don't have accented characters either, but on my main desktop PC (running CentOS Linux 5.4) I do have them in the console.
 
You have to set up a compose key. Execute % setxkbmap -option compose:rwin and put it in ~/.xinitrc or similar, so that it's executed every time you start X. Your compose key is now linked to the right "Windows" key.
Do this test: press the compose key, press ", press a. You should have ä. Note that all keys must be pressed and released immediately.
Now have fun with the slash, comma, tilde, grave accent, apostrophe, etc.
 
Sorry, but this is not a solution. If I follow your advice, I understand that FreeBSD cannot handle swiss/french/german keyboard layouts? I can't quite believe that.
 
This is curious. Are there no folks using FreeBSD with french, swiss of german keyboard layouts? I got curious and installed PCBSD on a spare machine, and all my different keyboard layouts work here. So the question would be: what do I need on a stock FreeBSD install to have accented characters (in X, and eventually in the console)?
 
if my memory doesn't fail me i think part of the solution to my accented-characters-in-console-problem was to change the terminal type in /etc/ttys to cons24l1 and then restart init with # kill -HUP 1
 
This will not turn out well.

Beastie said:
You have to set up a compose key. Execute % setxkbmap -option compose:rwin and put it in ~/.xinitrc or similar, so that it's executed every time you start X. Your compose key is now linked to the right "Windows" key.
Do this test: press the compose key, press ", press a. You should have ä. Note that all keys must be pressed and released immediately.
Now have fun with the slash, comma, tilde, grave accent, apostrophe, etc.

Møøse bÿtès cän bî vérrì nåsti, yôü knöw.

Haha, sweet. Thanks.
 
Neither of the suggested solutions worked. setxkbmap {fr,de,ch} works OK, but only for the "basic" layout of the keys (azerty for fr, qwertz for de and ch), but still I have no accented characters.

But I suspect something here. Does FreeBSD expect me to specify the encoding somewhere? My Linux system defaults to UTF-8, and thinking of it, I don't even know how FreeBSD handles this? Is it equally UTF-8-aware? Or do I eventually have to specify some latin1 encoding in some configuration file, like ISO-8859-1 or ISO-8859-15? (Nine years of GNU/Linux, habits die hard...)
 
no accent characters on fr keyboard

Hello,
I have the same problem and still not solved... I am trying to configure the xorg session for my French keyboard. I am using FreeBSD 8.1 in a VM. I am using the basic /etc/X11/xorg.conf and after a lot of searching and reading I finaly got the French keymap (btw, I had to disable AutoAdd Devices).

I now have the correct keys but the accent letters (é è à ù and also € sign) keys still do not operate, I just get a bip instead. I have the same behavior on the text console.

I have also installed PC-BSD 8.1 and this one has an excellent French mapping. I tried to find where is the config, but I am too new to these OS.



Thanks
 
balab said:
but the accent letters (é è à ù and also € sign) keys still do not operate , I just get a bip instead.
% setxkbmap fr
Code:
2 = é
7 = è
9 = ç
0 = à
% (or " on a QWERTY keyboard) = ù
Quite "incredible" eh?
 
Unfortunately this does not give me the accent letters. I tried the setxkbmap fr in a xterm windows and also tried to set the French kb directly in the xorg.conf. The only step I succeed is to obtain an "AZERTY" keyboard but no é è à etc....

In the xorg.conf, I set the section as shown here

Code:
Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option 	"XkbModel" "pc105"
	Option  "XkbVariant" "nodeadkeys"
	Option	"XkbLayout" "fr"
	Option "CustomKeycodes" "off"
        Option "XKbOptions" "terminate:ctrl_alt_bksp"
EndSection

I also set Option
Code:
"AutoAddDevices"	"Off"
in ServerFlags, because if you don't do it you will allways get the us kb.

May be, it a a clue to say even in text console mode, I have the same behavior ...

thanks
 
In FreeBSD 8.1 (but i think it will work in 7.3 too), to use all characters (eg: ò ç à ù è é ì $ € £) on my it (italian) keyboard, i set:

In /etc/rc.conf
Code:
font8x8="iso15-8x8"
font8x14="iso15-8x14"
font8x16="iso15-8x16"
keymap="it.iso"

In /etc/ttys and in all other used consoles
Code:
ttyv0 "/usr/libexec/getty Pc"   cons25l1    on   insecure

In /.cshrc and /usr/home/username/.cshrc
Code:
setenv  LANG en_US.ISO8859-15
setenv  LC_MONETARY it_IT.ISO8859-15
setenv  LC_TIME it_IT.ISO8859-15
setenv  LC_NUMERIC it_IT.ISO8859-15
setenv  MM_CHARSET iso-8859-15

The above settings works in console, at least in mine (i use tcsh, and i prefer en_US language but the others).

While to enable in X, set:

In /usr/local/etc/hal/fdi/policy/x11-input.fdi
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keyboard">
<merge key="input.x11_options.XkbModel" type="string">pc105</merge>
<merge key="input.x11_options.XkbLayout" type="string">it</merge>
</match>
</device>
</deviceinfo>

And finally in /usr/X11R6/lib/X11/fonts/misc/fonts.alias

change every font entry from:
Code:
-..........-iso8859-1

to:
Code:
-..........-iso8859-15

I think that replacing it with fr (or other country symbol) in the above files should work.

Good Luck!! :)
 
I fixed it for Xorg! Following your instructions I finally understood that only the LANG variable was missing in my configuration.

Here are the simple steps to configure Xorg :

I - In /etc/X11/xorg.conf

1: disable the automatic add andenable devices , otherwise you'll get a us kb

Code:
Section "ServerFlags"
Option "AutoAddDevices"	"Off"
Option "AutoEnableDevices" "Off"
Option "AllowEmptyInput" "Off"
EndSection

2: set your keyboard and preferences

Code:
Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option 	"XkbModel" "pc105"
	Option  "XkbVariant" "nodeadkeys"
	Option	"XkbLayout" "fr"
	Option "CustomKeycodes" "off"
        Option "XKbOptions" "terminate:ctrl_alt_bksp"
EndSection

II - set the LANG variable[/B] ( to obtain the é,è,€ etc... in a xterm window (the localize chapter of the handbook is helpful)

I have setup that globally for the machine via /etc/login.conf inserting 2 line in the
default section. I took a look at PC-BSD config which is helpfull.

Code:
default:\

        [B][I]Many lines removed.....[/I][/B]

	:charset=UTF-8:\
	:lang=en_US.UTF-8:\
	:umask=022:
and recompile the file with cap_mkdb

You will get MM_CHARSET and LANG variables correctly set.

I am still searching for the console...
 
Nice!

For ISO-8859-15 it works with my settings in FreeBSD-8.1-Release.
I don't know if UTF-8 work in console, cause i don't use it, and don't need it.

You can try to set UTF-8 in /.cshrc and /usr/home/username/.cshrc

If don't work, read the Handbook, the Faqbook, the Articles and search the forum.
I saw, times ago, some threads regarding UTF-8 in console ... maybe ....

Good Luck!! :)
 
For Xorg environment both charsets are ok either UTF-8 or ISO-8859-1 or -15. What's important is to have LANG declared with a compatible charset.
 
When LANG is not set I can hear a bip and diacritic characters do not show (nor € sign)
both in text console and in xTerm.

When LANG is set to en_US.UTF-8 or other compatible character set. The text console does not show diacritic characters but no more beep. When I enter é for example , I have to hit enter 5 times to have \351 printed on the screen. The xTerm is really fine and I get all the characters from my french keyboard.
 
If UTF-8 don't work in console, but iso-8859-15 do, why you don't use different settings, iso-8859-15 for console and UTF-8 for X?

I'm not sure it will work, but you can try.
 
Back
Top