bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: utf-8 input under X11


From: David Monniaux
Subject: Re: utf-8 input under X11
Date: Mon, 29 Oct 2001 13:07:31 +0100

Le Lundi 29 Octobre 2001 10:58, Eli Zaretskii a écrit :

> I think we should exercise some care here, lest we break more
> things than we fix.  Is it guaranteed that in such a locale, the X
> keyboard works like on your system, or are there other factors that
> could influence that?

Would it also be possible to add to the documentation something along 
the lines of:

USING EMACS WITH UTF-8 LOCALES

Some systems, including recent versions of GNU/Linux, have terminals 
or X11 subsystems that can be configured to provide Unicode/UTF-8 
input and display. We assume here that your system signals this in 
the name of the locale (ex: fr_FR.ISO8859-1 is French for France in 
ISO-Latin-1, fr_FR.UTF-8 is French for France in UTF-8).

Since Unicode support in GNU Emacs is very primitive at the moment 
(we advise you to install the external Mule-UCS package if you intend 
to really use Unicode files), UTF-8 support is so far not enabled by 
default, even on UTF-8 locales. Nevertheless, you may consider adding 
the following to your .emacs if you intend to use GNU Emacs in UTF-8 
locales:

(progn
      (tool-bar-mode 0)
      (if (or (and (getenv "LC_ALL") (string-match "UTF-8" (getenv 
"LC_ALL")))
              (and (getenv "LC_CTYPE") (string-match "UTF-8" (getenv 
"LC_CTYPE"))))
          (progn (setq locale-coding-system 'utf-8)
                 (set-terminal-coding-system 'utf-8)
                 (set-keyboard-coding-system 'utf-8)
                 (set-selection-coding-system 'utf-8))))

[This should be rewritten to ask the locale system about the 
character set, but I don't know how to do this from Emacs-Lisp.]

-- 
David Monniaux            http://www.di.ens.fr/~monniaux
Laboratoire d'informatique de l'École Normale Supérieure,
Paris, France



reply via email to

[Prev in Thread] Current Thread [Next in Thread]