Commit | Line | Data |
---|---|---|
0a10297a | 1 | ;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*- |
4ed46869 | 2 | |
d7a0267c | 3 | ;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007 |
d4877ac1 | 4 | ;; Free Software Foundation, Inc. |
7976eda0 | 5 | ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
d7a0267c | 6 | ;; 2005, 2006, 2007 |
eaa61218 KH |
7 | ;; National Institute of Advanced Industrial Science and Technology (AIST) |
8 | ;; Registration Number H14PRO021 | |
4ed46869 KH |
9 | |
10 | ;; Keywords: multilingual, Japanese | |
11 | ||
12 | ;; This file is part of GNU Emacs. | |
13 | ||
14 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
15 | ;; it under the terms of the GNU General Public License as published by | |
d7142f3e | 16 | ;; the Free Software Foundation; either version 3, or (at your option) |
4ed46869 KH |
17 | ;; any later version. |
18 | ||
19 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
20 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 | ;; GNU General Public License for more details. | |
23 | ||
24 | ;; You should have received a copy of the GNU General Public License | |
369314dc | 25 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
3a35cf56 LK |
26 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
27 | ;; Boston, MA 02110-1301, USA. | |
4ed46869 KH |
28 | |
29 | ;;; Commentary: | |
30 | ||
31 | ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are | |
32 | ;; supported. | |
33 | ||
34 | ;;; Code: | |
35 | ||
25192984 KH |
36 | (make-coding-system |
37 | 'iso-2022-jp 2 ?J | |
5ef35063 | 38 | "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)." |
25192984 | 39 | '((ascii japanese-jisx0208-1978 japanese-jisx0208 |
bd140771 | 40 | latin-jisx0201 japanese-jisx0212) nil nil nil |
6def6186 | 41 | short ascii-eol ascii-cntl seven) |
a79a3c79 | 42 | '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208 |
bd140771 | 43 | latin-jisx0201 japanese-jisx0212) |
2537259e | 44 | (mime-charset . iso-2022-jp))) |
25192984 KH |
45 | |
46 | (define-coding-system-alias 'junet 'iso-2022-jp) | |
dd53c981 | 47 | |
337ae039 KH |
48 | (make-coding-system |
49 | 'iso-2022-jp-2 2 ?J | |
5ef35063 | 50 | "ISO 2022 based 7bit encoding for CJK, Latin-1, and Greek (MIME:ISO-2022-JP-2)." |
337ae039 | 51 | '((ascii japanese-jisx0208-1978 japanese-jisx0208 |
b4c93b68 | 52 | latin-jisx0201 japanese-jisx0212 |
337ae039 KH |
53 | chinese-gb2312 korean-ksc5601) nil |
54 | (nil latin-iso8859-1 greek-iso8859-7) nil | |
744de246 | 55 | short ascii-eol ascii-cntl seven nil single-shift nil nil nil init-bol) |
337ae039 | 56 | '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208 |
b4c93b68 | 57 | latin-jisx0201 japanese-jisx0212 |
337ae039 KH |
58 | chinese-gb2312 korean-ksc5601 |
59 | latin-iso8859-1 greek-iso8859-7) | |
60 | (mime-charset . iso-2022-jp-2))) | |
61 | ||
4ed46869 | 62 | (make-coding-system |
4b9121fc | 63 | 'japanese-shift-jis 1 ?S |
5ef35063 | 64 | "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)." |
6def6186 | 65 | nil |
a79a3c79 KH |
66 | '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978 |
67 | latin-jisx0201 katakana-jisx0201) | |
ffd809f2 KH |
68 | (mime-charset . shift_jis) |
69 | (charset-origin-alist (japanese-jisx0208 "SJIS" encode-sjis-char) | |
70 | (katakana-jisx0201 "SJIS" encode-sjis-char)))) | |
4ed46869 | 71 | |
71eabd24 RS |
72 | (define-coding-system-alias 'shift_jis 'japanese-shift-jis) |
73 | (define-coding-system-alias 'sjis 'japanese-shift-jis) | |
4b0bf0ab | 74 | (define-coding-system-alias 'cp932 'japanese-shift-jis) |
4ed46869 KH |
75 | |
76 | (make-coding-system | |
4b9121fc | 77 | 'japanese-iso-7bit-1978-irv 2 ?j |
5ef35063 | 78 | "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman." |
25192984 KH |
79 | '((ascii japanese-jisx0208-1978 japanese-jisx0208 |
80 | latin-jisx0201 japanese-jisx0212 katakana-jisx0201 t) nil nil nil | |
6def6186 KH |
81 | short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis) |
82 | '(ascii japanese-jisx0208-1978 japanese-jisx0208 latin-jisx0201)) | |
4ed46869 | 83 | |
71eabd24 RS |
84 | (define-coding-system-alias 'iso-2022-jp-1978-irv 'japanese-iso-7bit-1978-irv) |
85 | (define-coding-system-alias 'old-jis 'japanese-iso-7bit-1978-irv) | |
dd53c981 | 86 | |
4ed46869 | 87 | (make-coding-system |
4b9121fc | 88 | 'japanese-iso-8bit 2 ?E |
5ef35063 | 89 | "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)." |
a79a3c79 | 90 | '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212 |
6def6186 | 91 | short ascii-eol ascii-cntl nil nil single-shift) |
a79a3c79 KH |
92 | '((safe-charsets ascii latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978 |
93 | katakana-jisx0201 japanese-jisx0212) | |
94 | (mime-charset . euc-jp))) | |
4ed46869 | 95 | |
71eabd24 RS |
96 | (define-coding-system-alias 'euc-japan-1990 'japanese-iso-8bit) |
97 | (define-coding-system-alias 'euc-japan 'japanese-iso-8bit) | |
98 | (define-coding-system-alias 'euc-jp 'japanese-iso-8bit) | |
4ed46869 | 99 | |
4ed46869 | 100 | (set-language-info-alist |
a564ccf9 | 101 | "Japanese" '((setup-function . setup-japanese-environment-internal) |
c089af63 | 102 | (tutorial . "TUTORIAL.ja") |
a79a3c79 | 103 | (charset japanese-jisx0208 japanese-jisx0208-1978 |
d6f08fd9 KH |
104 | japanese-jisx0212 latin-jisx0201 katakana-jisx0201 |
105 | japanese-jisx0213-1 japanese-jisx0213-2) | |
a79a3c79 KH |
106 | (coding-system iso-2022-jp japanese-iso-8bit |
107 | japanese-shift-jis japanese-iso-7bit-1978-irv) | |
108 | (coding-priority iso-2022-jp japanese-iso-8bit | |
337ae039 | 109 | japanese-shift-jis iso-2022-jp-2) |
a564ccf9 KH |
110 | (input-method . "japanese") |
111 | (features japan-util) | |
a79a3c79 | 112 | (sample-text . "Japanese (\e$BF|K\8l\e(B) \e$B$3$s$K$A$O\e(B, \e(I:]FAJ\e(B") |
78eee0ed | 113 | (documentation . t))) |
4ed46869 | 114 | |
41da80b1 DL |
115 | (provide 'japanese) |
116 | ||
ab5796a9 | 117 | ;;; arch-tag: 450f5537-9d53-4d5e-b731-4cf116d8cbc9 |
4ed46869 | 118 | ;;; japanese.el ends here |