Next Previous Contents

3. Display and application setup

Most applications need to be compiled as ``8-bit-clean'' to work well with European characters. Some need a few extra hints to get it right.

3.1 Loading the ISO-8859-1 font on the console

Execute the following commands from your shell prompt:

setfont lat1-16.psf
mapscrn trivial
echo -ne '\033(K'
(Note: Change the last line to echo -n '\033(K' if you use the tcsh shell.)

You could also choose to load a unicode font to ensure that line graphics is displayed correctly in programs such as mc and workbone. Execute the following commands to do that:

setfont lat1u-16.psf
You will need to execute the echo command shown above if you use Linux kernels older than v1.3.1.

3.2 The Euro symbol

A new symbol should be added to the character set soon: The symbol for the Euro (the new common European currency.) A new character set called ISO-8859-15 a.k.a. latin0 has been created to replace latin1. You must use the EURO package to get support for latin0. The package includes both fonts and keymaps.

3.3 Characters you can display under Linux

Type dumpkeys -l | less at the prompt to find out which characters that are readily available. You can map them to your keyboard via the keymap files mentioned in section Loading a keytable.

3.4 International character sets in specific applications

A number of applications demand special attention. This section describes how to set up configuration files for them.

bash:

Put the following in your ~/.inputrc file:

set meta-flag on
set convert-meta off
set output-meta on

elm:

Put the following definitions in your ~/.elm/elmrc file:

charset = iso-8859-1
displaycharset = iso-8859-1
textencoding = 8bit

This may not work on some versions of elm. You can get partial MIME support in elm if you use metamail.

emacs:

Put the following in your ~/.emacs or the the system-wide initialization file (probably /usr/lib/emacs/site-lisp/default.el or /usr/share/emacs/site-lisp/default.el):

(standard-display-european t)
(set-input-mode (car (current-input-mode))
        (nth 1 (current-input-mode))
        0) 

You can leave out the first two of the lines above if you have installed locale support, and your LC_CTYPE environment variable includes one of the strings 8859-1 or 88591. See section Locale support in libc 5.4.x for some information on locales.

Dead keys should work under GNU emacs provided you use GNU emacs v19.30 or higher and XFree86 v3.1.2 or higher (it works for me anyway,) so do not start researching available elisp packages implementing ``electric keys'' or anything like that. If you want to implement European keyboard conventions in emacs without upgrading, the best choice is probably the remap package available from SunSite DK. There are also two packages called iso-acc.elc and iso-trans.elc included with emacs that have similar functionality, but they are not nearly as powerful.

groff:

Issue the command as

groff -Tlatin1 <your_groff_input_file>

Remember to change this in /etc/man.config to get latin1 characters working in man (don't remove the -mandoc switch.)

ispell --- Spell checking in Danish:

First make sure that you install version 3.1.20 instead of version 4.0 of ispell. The latter is obsolete and multiple brain-damaged. You can download the sources for ispell at the GNU archive and you can get a Danish dictionary from SSLUG. Follow the compilation instructions and you should have no trouble (One caveat: When defining the variables necessary for compilation you must tell ispell that Linux is a SysV type OS by defining the variable USG.)

When you have installed the Danish dictionary for ispell you can check the spelling of a Danish language file by executing the command:

ispell -d danish -T latin1 -w "æøåÆØÅ" <your_danish_text_file>

(Note for non-Danish readers: You can find dictionaries for most Western languages by reading the file Where included with the sources for ispell.)

joe:

Issue the command as

joe -asis
or put the following in your ~/.joerc file:
-asis

The hyphen character must be in the first column.

kermit:

This is as close as I can get, but not completely satisfying yet. Put the following in your ~/.kermrc file:

set terminal bytesize 8
set command bytesize 8
set file bytesize 8
set language danish
set file character-set latin1-iso
set transfer character-set latin1-iso
set terminal character-set latin1-iso

I think there are more variables to set, but they are hiding. You would have to modify these settings if the remote system is DOS or OS/2 based.

less:

Set the following environment variable:

LESSCHARSET=latin1

ls:

Issue the command as

ls -N
or possibly
ls --8bit

lynx:

Put the following definition in your ~/.lynxrc file:

character_set=ISO Latin 1

This can also be set via the Options menu in lynx. Type `o' and set the relevant option.

man:

See entry for groff in this section.

metamail:

Set the following environment variable:

MM_CHARSET=ISO-8859-1

nn:

Put the following in your ~/.nn/init file:

set data-bits 8

pine:

Put the following definition in your ~/.pinerc file:

character-set=ISO-8859-1

This can also be set via the Setup, Config menu option in pine. It won't hurt to enable enable-8bit-esmtp-negotiation and enable-8bit-nntp-posting (for news) in that menu too.

rlogin:

Issue the command as

rlogin -8 foo.bar.dk

sendmail:

Put (or uncomment) the following in your /etc/sendmail.cf file:

O SevenBitInput=False
O EightBitMode=pass8
O DefaultCharSet=iso-8859-1

tcsh:

Put the following in your /etc/csh.login or ~/.tcshrc file:

setenv LANG C

Actually you just have to define one of the environment variables LANG or LC_CTYPE. The value does not matter. Read the tcsh man page for more information.

telnet:

Put one line of the following type in your ~/.telnetrc file for each host you want to log on to using telnet:

<hostname> set outbinary true

Example:

localhost set outbinary true
foo.bar.dk set outbinary true

TeX/LaTeX:

There are several problems with TeX/LaTeX: You want LaTeX to understand the special characters and you do not want LaTeX to put in English words like ``Chapter'' at the beginning of every chapter or use English typesetting conventions.

Under LaTeX2e the header of your input file should look something like this:

\documentclass[a4paper]{article}

\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[danish]{babel}

The first usepackage statement ensures that LaTeX will interpret European characters correctly, so you do not have to use escape codes for European characters. The second one is not strictly necessary, but it is recommended including it to use the new EC fonts (previously called DC fonts.) The third usepackage statement defines a range of standards for typesetting texts in Danish.

All the major Linux distributions now includes the teTeX package. To set up teTeX you must run the script texconfig. Here you can choose Danish hyphenation (dansk: ``orddeling''), A4 papersize for dvips and xdvi etc.

All new Linux distributions include LaTeX2e, but on older systems you might come across LaTeX 2.09. If that happens you can use

\documentstyle[a4,isolatin]{article}
to include support for ISO-8859-1 characters and European paper sizes. A better thing to do would be to ask your system administrator to upgrade to LaTeX2e.

isolatin.sty is available from all CTAN servers.

Some people prefer to use emacs in a special mode which translates ``special'' letters into TeX escape codes, but this method is obsolete.

tin:

Put the following definitions in your ~/.tin/headers file:

Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Now you can post messages with the proper Danish characters in the message body.


Next Previous Contents