s i s t e m a o p e r a c i o n a l m a g n u x l i n u x | ~/ · documentação · suporte · sobre |
Next
Previous
Contents
12. How to make other programs work with non-ASCII chars
In the bad old days this used to be quite a hassle. Every separate
program had to be convinced individually to leave your bits alone.
Not that all is easy now, but recently a lot of gnu utilities have
learned to react to First of all, the 8-th bit should survive the kernel input processing,
so make sure to have A. For
into your $HOME/.emacs .
The first line (to be precise: the final 1)
tells emacs not to discard the 8-th bit from input characters.
The second line tells emacs not to display non-ASCII characters
as octal escapes.
The third line specifies the syntactic properties
and case conversion table for the Latin-1 character set
These last two lines are superfluous if you have something like
LC_CTYPE=ISO-8859-1 in your environment.
(The variable may also be LC_ALL or even LANG .
The value may be anything with a substring `88591' or `8859-1'
or `8859_1'.)
This is a good start. On a terminal that cannot display non-ASCII ISO 8859-1 symbols, the command
will cause accented characters to be displayed comme {,c}a.
If your keymap does not make it easy to produce non-ASCII characters,
then
will make the 2-character sequence Ctrl-X 8 a compose character,
so that the 4-character sequence Ctrl-X 8 , c produces c-cedilla.
Very inconvenient.
The command
will toggle ISO-8859-1 accent mode, in which the six
characters ', `, ", ^, ~, / are dead keys
modifying the following symbol.
Special combinations: ~c gives a c with cedilla,
~d gives an Icelandic eth, ~t gives an Icelandic thorn,
"s gives German sharp s, /a gives a with ring,
/e gives an a-e ligature, ~< and ~> give guillemots,
~! gives an inverted exclamation mark,
~? gives an inverted question mark, and '' gives an acute accent.
This is the default mapping of accents.
The variable iso-languages is a list of pairs (language name,
accent mapping), and a non-default mapping can be selected using
Here LANGUAGE can be one of "portuguese" , "irish" ,
"french" , "latin-2" , "latin-1" .
Since the Linux default compose character is Ctrl-. it might be convenient to use that everywhere. Try
The latter line will not work under xterm , if you use emacs -nw ,
but in that case you can put
in your .Xresources .)
B. For C. For D. For
and, according to the Danish HOWTO,
into your $HOME/.inputrc .
E. For
If you have nls on your system, then the corresponding routines are used.
Otherwise tcsh will assume iso_8859_1, regardless of the values given to
LANG and LC_CTYPE. See the section NATIVE LANGUAGE SYSTEM in tcsh(1).
(The Danish HOWTO says: setenv LC_CTYPE ISO-8859-1; stty pass8 )
F. For G. For H. For programs using curses (such as I. For programs using J. For K. For L. For M. For LaTeX: A nice discussion on the topic of ISO-8859-1 and how to manage 8-bit
characters is contained in the file If you need to fix a program that behaves badly with 8-bit characters, one thing to keep in mind is that if you have a signed char type then characters may be negative, and using them as an array index will fail. Several programs can be fixed by judiciously adding (unsigned char) casts.
Next Previous Contents |