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

Re: man, less, et utf8



Pour emacs, j'ai ceci dans mon .emacs (j'utilise de préférence
l'ISO-8859-1, mais je n'ai aucun problème avec l'UTF-8):

(set-language-environment "Latin-1")

(prefer-coding-system 'latin-1)
(and (boundp 'coding-category-utf-8)
     (set-coding-priority
      '( coding-category-utf-8
         coding-category-iso-8-1
         coding-category-iso-8-2
         coding-category-raw-text )))

(defun getlocale (vars)
  (if vars
    (let ((locale (getenv (car vars))))
      (if locale locale (getlocale (cdr vars))))
    ""
))

(if (string-match "UTF-8\\>" (getlocale '("LC_ALL" "LC_CTYPE" "LANG")))
  (progn
    (set-keyboard-coding-system 'utf-8)
    (set-terminal-coding-system 'utf-8))
)

Concernant less, comment lui faire reconnaître automatiquement le jeu
de caractères (pour pouvoir visualiser des fichiers en ISO-8859-1)?

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



Reply to: