|Table 1. The ISO-8859-2 Character Set|
Copyright © 1999 G. Adam Stanislav.
All rights reserved.
What is ISO-8859-2
ISO-8859-2 is an international standard for encoding of computer keyboards and video hardware to properly input and display accented characters used by Central-European languages.
These languages use the Roman alphabet (same as you see here). They, however, need more than 26 characters to record their phonemes. They use accent marks to modify the pronunciation of standard Roman characters.
The Americentric creators of the original personal computers completely disregarded these, and other, European languages. They used a 7-bit code, commonly known as ASCII, which is capable of encoding only the very basic characters of Roman alphabet.
To solve this problem, the International Standards Organization developed a family of standards called ISO-8859. Each of these standards combines the accented characters of several languages into an 8-bit code.
As most of these languages use the basic Roman alphabet (with the exception of Eastern and several Southern Slavic languages that use the Cyrillic alphabet), each of the standards starts with the same encoding as ASCII. It then defines additional characters.
The encoding of the characters and accent marks specific to ISO-8859-2 is shown in Table 1 above.
What is FreeBSD
A variety of UNIX, FreeBSD is an advanced operating system, particularly suitable for computer networking and internetworking. Many Internet servers (including the one running this web site) use FreeBSD as their operating system of choice due to its stability and reliability.
In the world disillusioned by Windows, FreeBSD is also becoming an increasingly popular choice for the operation of desktop computers. For more information about it, see the FreeBSD web site.
As an advanced operating system, FreeBSD gives each system administrator complete control over all aspects of its functionality. This includes the choice to map and remap the keyboard (and other input devices), as well as the fonts used for its displays.
A number of keyboard maps come included with the standard FreeBSD distribution. They can be found in the /usr/share/syscons/keymaps directory. These are easy to edit text files, so any FreeBSD system administrator can either use the maps included with the system, or edit them, even create them from scratch.
FreeBSD and ISO-8859-2
When I installed FreeBSD on my computer, I was looking for an included keyboard map that would allow me to use Slovak, the language I grew up with. I did not find one. Slovak, as you may have guessed, is one of the languages whose characters are included in ISO-8859-2. I did find maps for other languages using the same standard, but each of the maps was specific to that language.
I then set out to study these maps, so I could learn their syntax, and create a map for the use with Slovak.
At the same time, I wanted to keep the ability to use the US QWERTY keyboard layout since I use English much more than Slovak. I also wanted the ability to use the characters of other ISO-8859-2 languages, such as Czech, Polish, and German, should I ever need them. I could, of course, change the maps on the fly. But why should I have to?
Computers and typewriters
After several days of trial and error, I finally created the key map based on the Slovak keyboard layout used by MS Windows 95, which I also use as a legacy system. I used the alt-space combination to switch between the Slovak layout and the US QWERTY layout within the same map.
The problem with the Windows layout is that it emulates a Slovak typewriter. Although it does make certain sense that a Slovak typist should have the same layout on the typewriter and on the computer, it seems to make even more sense not to do it that way. The computer is not a typewriter! It requires different ergonomics.
For example, there is no @, ~, or # on a Slovak typewriter. Nor should it be there. These symbols simply do not exist in Slovak usage.
These symbols are a must on a computer keyboard, certainly on one attached to a UNIX system!
A universal ISO-8859-2 map
The key map I had created could do it all, but was very complex and counter-intuitive. It also violated the KISS principle.
I decided to toss it!
But it was an excellent learning experience. In almost no time was I able to produce a universal ISO-8859-2 key map.
This map does not require me to switch between two different layouts. Everything from the old US QWERTY keyboard is where it always has been. But it adds every single character from Table 1 to my keyboard.
That is additional 63 characters (not counting the first one, number 160, which is empty).
All I had to do was add a third option to every key in the top row (see Table 2) by using the Alt key as a switch. For example, pressing Alt-! produces character 223 (the German ß).
I also added alt-options to the /, *, and . keys of the numeric keypad.
Several of the keys I used as accent dead keys. That means they tell FreeBSD I want the next key to be accented. For example, Alt-minus means acute. If I press it, and next type a, I get á.
The Alt+key combinations of `, 5, 6, 8, 9, 0, -, =, and \ are the dead keys (the latter produces Polish slashed l (ł) and Croatian dashed d (đ), when followed by those characters). If you want to print the accent mark itself, press the appropriate Alt+key, then hit the space bar.
The Alt+2 combination produces the degree sign, as opposed to Alt+8 which is the ring accent used by Czech over u (ů).
Alt+7 is a hyphen, not minus. The last three columns of table 2 define three keys on the numeric keypad.
Next, I created several derived maps. These are key maps with the same layout but additional Alt options. For example, pressing Alr-r using a Slovak derived map produces an acute r (ŕ), while with a Czech derivative an r with a caron (ř). These were the first two derived maps I made since they do not have a default map coming with the FreeBSD distribution at this time.
I would like to see additional derived maps for other languages, even those that already have a FreeBSD map available.
Because national boundaries are not always straight. For example, there are Hungarians living in Southern Slovakia, and Slovaks living in Northern Hungary. Now suppose that Slovak and Hungarian keymaps use different layout. If a person using one keymap at his home visits a person using the other keymap, and wants to use his computer, he needs to make a mental shift for the different keymap.
But if both used keymaps derived from the universal ISO-8859-2 map, they can share computers: Even if the derived sections are different, the universal section as seen in table 2 is the same. That makes sharing of computers in nationally mixed communities easy.
If you wish, I can create a derived key map for your language. Just email me the list of accented characters your language uses. If some characters can be used with more than one accent (e.g., in Slovak a can be acute or umlauted), let me know which one is more commonly used. I will map it to Alt + base character. I will map the other to the nearest non-accented character.
For example, in the Slovak keymap, Alt+a = acute a (á), Alt-q = umlauted a (ä); Alt+o = acute o (ó), Alt+p = circumflexed o (ô); Alt+l = caroned l(ľ), Alt+k = acute l (ĺ).
In the Czech keymap, Alt+e = acute e (é), Alt+w = caroned e (ě); Alt+u = ringed u (ů), Alt+j = acute u (ú).
All others unambiguously use Alt+character, e.g., Alt+c = caroned c (č) in both the Slovak and the Czech maps. Similarly, Alt+r is acute r (ŕ) in the Slovak map, caroned r (ř) in the Czech map, because they are used differently in the two languages.
A key map would do you no good if you did not have the appropriate console font. While FreeBSD comes with several ISO-8859-2 fonts, I do not really care for them. They seem to be the same fonts we have seen under DOS (or at least appear to be inspired by them).
Whoever designed these fonts decided to shrink all capital letters whenever they have a diacritic (accent mark) above them. That is not how we write!
Therefore, I designed a font for the use with VGA 8x16 mapping. This font does not shrink letters. You can download it from here (or from the fonts directory of my ftp site). The README file explains how you can install it under FreeBSD.
Note that the font is simply a raw image to be loaded into VGA BIOS data area. The file is uuencoded (FreeBSD likes it that way). But once you uudecode it, you should be able to use it under any operating system as long as you are using VGA in text mode. Please consult your operating system manuals how to load a VGA font.
You can download the ISO-8859-2 maps by right-clicking on them below and instructing your browser to save them. Alternately, you can get them from my ftp site.
Here they are:
The following languages do have key maps included with the standard FreeBSD distribution. The maps offered here have the advantage (or disadvantage, depending on your point of view) of being fully compatible with the Universal ISO-8859-2 key map, and thus can be considered international.
Once you have downloaded the file, you can extract it to your /usr/share/syscons/keymaps directory. You can type kbdcontrol -l ce.iso2 (or sk.iso2, cz.iso2, etc.) to load the map. It will stay loaded until you load another, or reboot the system.
To install it as your default key map, edit the /etc/rc.conf file.
QWERTY vs QWERTZ
Keymaps presented here use the QWERTY system which appears on most computer keyboards. But many Central-European typists are used to the QWERTZ system. The only difference between the two is that letters y and z are swapped.
If you prefer the QWERTZ keyboard, all you need to do is edit the keymap slightly in a text editor.
Simply find the two lines for these keys. One of them starts with 021, the other with 044. Change the 021 to 044 and the 044 to 021 (only change the numbers, not the rest of the lines). Save your changes as ce.qwertz.kbd (or sk.qwertz.kbd, cz.qwertz.kbd, etc.), and run kbdcontrol again. You will now have a QWERTZ keyboard.
Using non-ASCII characters on the Internet