Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wscons with UTF-8 encoding

Hi -
since i18n of wscons has its limits with the "vt100"
terminal emulation, I've implemented a variant which
could be a base fur future developments.

This is a verbatim copy of the "vt100" code, with
the original font mapping replaced by a much simpler
one -- one which just displays UTF-8 encoded input.
This would naturally work with .UTF-8 userland locale
settings. I've tested with LANG=de_DE.UTF-8, emacs
and w3m, and it works well so far.

If you want to play with this -- I've put up the code
for FTP, plus some supporting patches, at:

The terminal emulator is "ucons-2.tar.gz". (The "2"
is a version number which might change.) It is built
as a kernel module. To be able to load it, a small
kernel patch "wsemul.txt" is needed, which provides
hooks for dynamic loading of terminal emulations.
(NetBSD-current is assumed.)
To build the module, unpack the archive (anywhere),
adjust the path to the kernel sources at the top
of the Makefile and "make".

To use the emulation, it needs basically the following:
# modload ucons.kmod
# wsconscfg -e ucons 6
[the "6" is an unused virtual screen, adjust for your
add a line to "/etc/ttys" like:
ttyE6   "/usr/libexec/getty Pc"  xterm  on secure
# kill -1 1
wait a while
switch to VT 6 (i.e. Ctl-Alt-F7)
log in
$ LANG=de_DE.UTF-8; export LANG
[adjust for your needs]

The next problem is to get font support for characters
not in the standard IBM font. (assuming a VGA card in
text mode here)
I've added two patches which demonstate this for iso-2:
"pcdisplay-iso2.txt" just adds replacement mappings for
some popular czech and hungarian variants. They are just
replaced by plain characters without accents. Ugly, but
this way one gets something readable without extra fonts.
"vga-iso2.txt" adds mapping for externally loaded iso2
encoded fonts. With that, one would do:
# cd /usr/share/wscons/fonts
# wsfontload -e iso2 -N somename latin2.816
# wsconsctl -dw -f /dev/ttyE6 font=somename

This is a prototype, and incomplete, but it should show
what is needed to get it working for other languages.
And the keyboard mapping code needs some cleanup -- some
hacks crept in which need to be corrected.

best regards

Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt

Home | Main Index | Thread Index | Old Index