]> code.delx.au - gnu-emacs/blob - lisp/language/hebrew.el
3ff2538469d1477634eb14d3f65e0415a2e27c47
[gnu-emacs] / lisp / language / hebrew.el
1 ;;; hebrew.el --- support for Hebrew -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2
3 ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
4 ;; Free Software Foundation, Inc.
5 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
6 ;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
7 ;; National Institute of Advanced Industrial Science and Technology (AIST)
8 ;; Registration Number H14PRO021
9
10 ;; Copyright (C) 2003
11 ;; National Institute of Advanced Industrial Science and Technology (AIST)
12 ;; Registration Number H13PRO009
13
14 ;; Keywords: multilingual, Hebrew
15
16 ;; This file is part of GNU Emacs.
17
18 ;; GNU Emacs is free software: you can redistribute it and/or modify
19 ;; it under the terms of the GNU General Public License as published by
20 ;; the Free Software Foundation, either version 3 of the License, or
21 ;; (at your option) any later version.
22
23 ;; GNU Emacs is distributed in the hope that it will be useful,
24 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;; GNU General Public License for more details.
27
28 ;; You should have received a copy of the GNU General Public License
29 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
30
31 ;;; Commentary:
32
33 ;; For Hebrew, the character set ISO8859-8 is supported.
34 ;; See http://www.ecma.ch/ecma1/STAND/ECMA-121.HTM.
35 ;; Windows-1255 is also supported.
36
37 ;;; Code:
38
39 (define-coding-system 'hebrew-iso-8bit
40 "ISO 2022 based 8-bit encoding for Hebrew (MIME:ISO-8859-8)."
41 :coding-type 'charset
42 :mnemonic ?8
43 :charset-list '(iso-8859-8)
44 :mime-charset 'iso-8859-8)
45
46 (define-coding-system-alias 'iso-8859-8 'hebrew-iso-8bit)
47
48 ;; These are for Explicit and Implicit directionality information, as
49 ;; defined in RFC 1556. We don't yet support directional information
50 ;; in bidi languages, so these aliases are a lie, especially as far as
51 ;; iso-8859-8-e is concerned. FIXME.
52 (define-coding-system-alias 'iso-8859-8-e 'hebrew-iso-8bit)
53 (define-coding-system-alias 'iso-8859-8-i 'hebrew-iso-8bit)
54
55 (set-language-info-alist
56 "Hebrew" '((charset iso-8859-8)
57 (coding-priority hebrew-iso-8bit)
58 (coding-system hebrew-iso-8bit windows-1255 cp862)
59 (nonascii-translation . iso-8859-8)
60 (input-method . "hebrew")
61 (unibyte-display . hebrew-iso-8bit)
62 (sample-text . "Hebrew \e,Hylem\e(B")
63 (documentation . "Right-to-left writing is not yet supported.")))
64
65 (set-language-info-alist
66 "Windows-1255" '((coding-priority windows-1255)
67 (coding-system windows-1255)
68 (documentation . "\
69 Support for Windows-1255 encoding, e.g. for Yiddish.
70 Right-to-left writing is not yet supported.")))
71
72 (define-coding-system 'windows-1255
73 "windows-1255 (Hebrew) encoding (MIME: WINDOWS-1255)"
74 :coding-type 'charset
75 :mnemonic ?h
76 :charset-list '(windows-1255)
77 :mime-charset 'windows-1255)
78 (define-coding-system-alias 'cp1255 'windows-1255)
79
80 (define-coding-system 'cp862
81 "DOS codepage 862 (Hebrew)"
82 :coding-type 'charset
83 :mnemonic ?D
84 :charset-list '(cp862)
85 :mime-charset 'cp862)
86 (define-coding-system-alias 'ibm862 'cp862)
87
88 (provide 'hebrew)
89
90 ;; arch-tag: 3ca04f32-3f1e-498e-af46-8267498ba5d9
91 ;;; hebrew.el ends here