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