[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"Outer world" encoding for non-Latin1 language environments
From: |
Anton Zinoviev |
Subject: |
"Outer world" encoding for non-Latin1 language environments |
Date: |
Wed, 27 Feb 2002 13:29:51 +0200 |
User-agent: |
Mutt/1.2.5i |
Hi!
Even when users choose some non-Latin1 language environment Emacs
doesn't suppose that it's new default encoding is actually the
encoding of the X-clipboard, the console font, etc. This can be
easily changed in this way:
(set-language-info-alist
"Ukrainian" `((documentation . "\
Support for Ukrainian with KOI8-U coding system. If you prefer
UTF-8, please put in ~/.emacs the following line:
(prefer-coding-system 'utf-8)")
(charset ascii cyrillic-iso8859-5 mule-unicode-0100-24ff)
(sample-text . "here some Ukrainian tekst")
(setup-function . setup-koi8u-coding-system)
(exit-function . reset-coding-system)
(coding-system . (koi8-u utf-8))
(coding-priority . (koi8-u utf-8))
(nonascii-translation
. ,(get 'cyrillic-koi8u-nonascii-translation-table
'translation-table))
(input-method . "cyrillic-ukrainian")
(unibyte-display . cyrillic-koi8u)
(features cyril-util))
'("Cyrillic"))
Note the (setup-function . setup-koi8u-coding-system) and
(exit-function . reset-coding-system). They can be defined by
(features cyril-util) in this way:
(defun setup-koi8u-coding-system ()
(let ()
(set-keyboard-coding-system 'koi8-u)
(set-clipboard-coding-system 'koi8-u)
(set-terminal-coding-system 'koi8-u)))
(defun reset-coding-system ()
(let ()
(set-keyboard-coding-system 'latin-1)
(set-clipboard-coding-system nil)
(set-terminal-coding-system nil)))
Maybe someone will propose a better solution?
Regards, Anton Zinoviev
- "Outer world" encoding for non-Latin1 language environments,
Anton Zinoviev <=