# Localization - Czech letters



## mayerrs (Mar 31, 2016)

Hi, can anyone help me with localization, please? I tried to do it similar like Spanish _https://forums.freebsd.org/threads/50104/#post-280194 _here but it does not work for me.

I tried `bsdconfig` - nothing works for me.

I just would like to see czech letters in terminal - ěščřžýáíé and to have czech keyboard (qwertz).

I am really not able to do it.

How can I do it, please?

Thank you.


----------



## zirias@ (Apr 1, 2016)

What's your output of `locale`? It _should_ read cs_CZ.UTF-8 for $LANG and most $LC_* variables.

For setting the keyboard layout, try `kbdmap` first.


----------



## Juha Nurmela (Apr 1, 2016)

Also setxkbmap(1) under X11. Simply `setxkbmap cz` in your .xsession etc might do the trick.

Juha


----------



## mayerrs (Apr 2, 2016)

That is true. cs_CZ.UTF-8 is almost everywhere. only LC_ALL= _is blank
_
T have tried kbdmap first. It did not work.


----------



## mayerrs (Apr 2, 2016)

Juha Nurmela said:


> Also setxkbmap(1) under X11. Simply `setxkbmap cz` in your .xsession etc might do the trick.
> 
> Juha



iI try to set Czech without X11. rRight after clean install and without xorg.


----------



## zirias@ (Apr 2, 2016)

mayerrs said:


> that is true. cs_CZ.UTF-8 is almost everywhere. only LC_ALL= _is blank_


Good. Your locale settings are fine.


mayerrs said:


> i have tried kbdmap first. id did not work.


A little more info than "did not work" would increase the probability to find out what's wrong. For example, what's the result of some key presses? Do you get an 'y' for a 'z' and vice versa? Do keys meant for accented characters produce multiple characters of garbage, or just a single wrong character, or nothing at all?


----------



## mayerrs (Apr 4, 2016)

Zirias said:


> Good. Your locale settings are fine.
> 
> A little more info than "did not work" would increase the probability to find out what's wrong. For example, what's the result of some key presses? Do you get an 'y' for a 'z' and vice versa? Do keys meant for accented characters produce multiple characters of garbage, or just a single wrong character, or nothing at all?


you are right..

yipYes, when iI press y iI get z and vice versa. because iI set "qwertz" and iI still have "qwerty". iI guess iI still have default keyboard no matter what iI have set. wWhen iI press accented characters iI still have default keyboard layout so it means iI have 123.. and !@#$.. wWhen iI start lynx and iI go on some cCzech website iI get multiple characters of garbage for accented characters and actually terminal speaks cCzech language what is something iI do not need and want to. iI just would like to set Czech keyboard layout and get accented characters in lynx webpages.


----------



## Juha Nurmela (Apr 4, 2016)

The czech keymap seems to require Alt-Shift (just left side ?) before it activates. Very strange, maybe you as a native can guess why this is so. Maybe the file under /usr/share/vt/keymaps can be edited to get rid of that.

I added `export [B]LC_CTYPE=cs_CZ.UTF-8[/B]` in .profile, logged out and back, `kbdcontrol -l cz` and, after Alt-Shift, it's qwertz. Cannot tell if rest of the kezs are correct. There's a delazed ' for á etc so mazbe it is. Zou might put *kezmap=cy* into /etc/rc.conf.

Juha


----------



## Juha Nurmela (Apr 4, 2016)

I didn't have anything to do, so I edited out the English part from the Czech keymap. I hope it is useful, there is no guarantee or fee. The original file was
/usr/share/vt/keymaps/cz.kbd, this might be saved as cz.only.kbd

Juha


----------



## zirias@ (Apr 5, 2016)

Juha Nurmela said:


> I didn't have anything to do, so I edited out the English part from the Czech keymap.


Ok very interesting, I was just left baffled why keyboard map isn't working, so great job I guess? But you do realize there's another problem:


mayerrs said:


> when i start lynx and i go on some czech website i get multiple characters of garbage for accented characters


This suggests that the console itself doesn't understand how to display multibyte characters? This shouldn't happen, but just to get an idea, I'd like to ask which FreeBSD version that is and whether it's syscons or newcons (not that I would have any idea in both cases, I just think it could help others to pinpoint the problem).



mayerrs said:


> actually terminal speaks czech language what is something i do not need and want to.


For this, that should easy to solve: set the LC_* variables individually -- IIRC, the one responsible for the language programs use in their UI is LC_MESSAGES, so leave that in an english locale (but using the same charset, UTF-8 that is ..)


----------



## mayerrs (Apr 6, 2016)

*G*uys, *I* try it and let you know how this works.

*I* just do not get why this is not working when *I* use bsdconfig(8). *A*nd also, if you install FreeBSD and you try to change keyboard during installation and test this keyboard, it does not work. *I*sn't this a bug?


----------



## mayerrs (Apr 11, 2016)

*O*k, *I* tried it and something works. *T*he true is it works when *I* use Alt-Shift, it's qwertz, but *I* am not able to show multibyte characters. *I* tried FreeBSD 10.2 and also 10.3.


----------



## Juha Nurmela (Apr 11, 2016)

How do the national characters show up? As \nnn or \nnn\nnn? You aware of the differents shells, potentially needing to preset the environment in initialization files, and alternate console drivers sc (uses 8859) & vt (uses UTF-8) ? `sysctl kern.vty` to see which it is.

I have 8859 X11 (old dog likes the old tricks), and `echo ä|wc -c` is 2, 1+newline. UTF-8 vt virtual consoles show `echo ä|wc -c` as 3.

Juha


----------



## mayerrs (Apr 12, 2016)

When iI make `sysctl kern.vty` iI get sc and when iI make `echo ä|wc -c` iI get 2. The national characters are mostly like spaces.


----------



## Juha Nurmela (Apr 12, 2016)

The keymap is then under /usr/share/syscons/, not .../vt/.

Maybe the keys are ok, but screen is not. Type problematic characters to

```
$ od -cx
åäö
0000000  å  ä  ö  \n 
  e4e5  0af6 
0000004
```
The font is set in /etc/rc.conf

```
font8x16="iso-8x16.fnt"
font8x14="iso-8x14.fnt"
font8x8="iso-8x8.fnt"
```

Juha


----------



## mayerrs (Apr 12, 2016)

how i canHow can I type åäö?


----------



## Juha Nurmela (Apr 13, 2016)

Forget the åäö. Try any keys which don't work for you, and look up the hex in 8859 if it happens to be right, https://en.wikipedia.org/wiki/ISO/IEC_8859-1. Notice how od flips every two bytes.

Juha


----------

