The Quail Cyrillic input method, modified to handle Tajik, and encoded as UTF-8.

Download this file here.


;;; quail/cyrillic-im-utf-8.el -- Quail package for inputting Cyrillic
;;; characters, beyond those supported by ISO 8859-5. -*- coding: utf-8 -*- 

;; Hacked by Aidan, Sat Nov 5 13:54:45 CET 2005, to be stored as UTF-8, and
;; to support the Tajik characters in the Cyrillic-translit input method. 

;; Do not byte-compile this file--the UTF-8 to escape-quoted mapping is not
;; stable from one XEmacs invocation to the next, in my complete UTF-8
;; support implementation.

;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.

;; Keywords: multilingual, input method, Cyrillic

;; This file is part of GNU Emacs.

;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

;;; Code:

(require 'quail)

;; This was provided by Valery Alexeev <valery@domovoy.math.uga.edu>.

(quail-define-package
 "cyrillic-translit-aidan" "Cyrillic" "Жt" nil
 "Intuitively transliterated keyboard layout.

Most convenient for entering Tajik but should handle most cases. However:
  for ц (TSE) use \"c\", never \"ts\"
  щ (SHCHA = Bulgarian SHT) = \"shch\", \"sj\", \"/sht\" or \"/t\",
  э (REVERSE ROUNDED E) = \"e'\" or \"e`\"
  х (KHA) when after с (S) = \"x\" or \"kh\"
  ъ (HARD SIGN) = \"~\", Ъ (CAPITAL HARD SIGN) = \"~~\",
  ь (SOFT SIGN) = \"'\", Ь (CAPITAL SOFT SIGN) = \"''\",
  я (YA) = \"ya\"

Russian alphabet: a b v=w g d e yo=jo zh z i j=j' k l m n o p r s t
u f h=kh=x c ch sh shch=sj=/s=/sht ~ y ' e' yu=ju ya=ja

Also included are Ukrainian є (YE) = \"/e\" and ї (YI) = \"yi\", 
Belorussian ў (SHORT U) = \"u'\",
Serbian ђ (DJE) = \"/d\", ћ (CHJE)= \"/ch\", 
Macedonian ѓ (GJE) = \"/g\", ѕ (DZE) = \"/s\", ќ (KJE) = \"/k\",
cyrillic і (I DECIMAL) = \"/i\", ј (JE) = \"/j\", 
љ (LJE) = \"/l\", њ (NJE) = \"/n\" and џ (DZE) =\"/z\"."
 nil t t t t nil nil nil nil nil t)

(quail-define-rules
 ("a" ?а)("b" ?б) ("v" ?в) ("w" ?в) ("g" ?г) ("d" ?д) 
 ("e" ?е) ("ye" ?е) ("yo" ?ё)
 ;; ("jo" ?ё)
 ("zh" ?ж) ("z" ?з) 
 ("i" ?и) ("i'" ?й) ("i`" ?й)
 ("k" ?к) ("l" ?л)
 ("m" ?м) ("n" ?н) ("o" ?о) ("p" ?п) ("r" ?р) ("s" ?с) ("t" ?т) ("u" ?у)
 ("f" ?ф) ("x" ?х) 
 ;; ("h" ?х) 
 ("kh" ?х)
 ("c" ?ц) 
 ("ch" ?ч)

 ("sh" ?ш) 
 ("shch" ?щ) ("sj" ?щ) 
 ("/sht" ?щ) ("/t" ?щ) 
 ("~" ?ъ) ("y" ?ы) ("'" ?ь) ("`" ?ь) 
 ("e'" ?э) ("e`" ?э) ("@" ?э) 
 ("yu" ?ю) ;; ("ju" ?ю) 
 ("ya" ?я) ;; ("ja" ?я) 

 ;; Commented out by Aidan, so it can be used for қ. 
 ;; 
 ;; ("q" ?я)

 ;; Added by Aidan; 
 ;; 
 ;;   U+0493;CYRILLIC SMALL LETTER GHE WITH STROKE
 ;;   U+0492;CYRILLIC CAPITAL LETTER GHE WITH STROKE
 ;; 
 ;; are necessary for Tajik. 
 ("gh" ?ғ) ("Gh" ?Ғ) ("GH" ?Ғ)

 ;; U+04E2;CYRILLIC CAPITAL LETTER I WITH MACRON
 ;; U+04E3;CYRILLIC SMALL LETTER I WITH MACRON
 ;;
 ;; (used for word-final [i] sounds that are not the Persian Izofat.)
 ("I-" ?Ӣ) ("i-" ?ӣ)

 ;; U+049A;CYRILLIC CAPITAL LETTER KA WITH DESCENDER
 ;; U+049B;CYRILLIC SMALL LETTER KA WITH DESCENDER
 ;; 
 ;; (used for [q] in Tajik)
 ("Q" ?Қ) ("q" ?қ)

 ;; U+04EE;CYRILLIC CAPITAL LETTER U WITH MACRON
 ;; U+04EF;CYRILLIC SMALL LETTER U WITH MACRON
 ;;
 ;; Used for a separate vowel sound in Tajik. 
 ("U-" ?Ӯ) ("u-" ?ӯ)

 ;; U+04B2;CYRILLIC CAPITAL LETTER HA WITH DESCENDER
 ;; U+04B3;CYRILLIC SMALL LETTER HA WITH DESCENDER
 ;; 
 ;; Tajik has the /h/ sound. 
 ("H" ?Ҳ) ("h" ?ҳ)
 
 ;; U+04B6;CYRILLIC CAPITAL LETTER CHE WITH DESCENDER
 ;; U+04B7;CYRILLIC SMALL LETTER CHE WITH DESCENDER
 ;;
 ;; To be most intuitive to English speakers, this should be "j." 
 ("J" ?Ҷ) ("j" ?ҷ) 

 ("A" ?А) ("B" ?Б) ("V" ?В) ("W" ?В) ("G" ?Г) ("D" ?Д) 
 ("E" ?Е) ("Ye" ?Е) ("YE" ?Е)
 ("Yo" ?Ё) ("YO" ?Ё) ;; ("Jo" ?Ё) ("JO" ?Ё) 
 ("Zh" ?Ж) ("ZH" ?Ж) ("Z" ?З) ("I" ?И) 
 ("I'" ?Й) ("I`" ?Й) ("K" ?К) ("L" ?Л)
 ("M" ?М) ("N" ?Н) ("O" ?О) ("P" ?П) ("R" ?Р) ("S" ?С) ("T" ?Т) ("U" ?У)
 ("F" ?Ф) ("X" ?Х) 
 ;; ("H" ?Х) 
 ("Kh" ?Х) ("KH" ?Х)
 ("C" ?Ц) ("Ch" ?Ч) ("CH" ?Ч) 
 ("Sh" ?Ш) ("SH" ?Ш) 
 ("Shch" ?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