(latexenc-find-file-coding-system): Don't inherit the EOL part of the
[emacs.git] / lisp / language / japanese.el
blob92020acc685a0fb444edb565afa8e2fefaa00f49
1 ;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*-
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
8 ;; Keywords: multilingual, Japanese
10 ;; This file is part of GNU Emacs.
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.
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.
22 ;; You should have received a copy of the GNU General Public License
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.
27 ;;; Commentary:
29 ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are
30 ;; supported.
32 ;;; Code:
34 (make-coding-system
35 'iso-2022-jp 2 ?J
36 "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)."
37 '((ascii japanese-jisx0208-1978 japanese-jisx0208
38 latin-jisx0201 japanese-jisx0212) nil nil nil
39 short ascii-eol ascii-cntl seven)
40 '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208
41 latin-jisx0201 japanese-jisx0212)
42 (mime-charset . iso-2022-jp)))
44 (define-coding-system-alias 'junet 'iso-2022-jp)
46 (make-coding-system
47 'iso-2022-jp-2 2 ?J
48 "ISO 2022 based 7bit encoding for CJK, Latin-1, and Greek (MIME:ISO-2022-JP-2)."
49 '((ascii japanese-jisx0208-1978 japanese-jisx0208
50 latin-jisx0201 japanese-jisx0212
51 chinese-gb2312 korean-ksc5601) nil
52 (nil latin-iso8859-1 greek-iso8859-7) nil
53 short ascii-eol ascii-cntl seven nil single-shift nil nil nil init-bol)
54 '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208
55 latin-jisx0201 japanese-jisx0212
56 chinese-gb2312 korean-ksc5601
57 latin-iso8859-1 greek-iso8859-7)
58 (mime-charset . iso-2022-jp-2)))
60 (make-coding-system
61 'japanese-shift-jis 1 ?S
62 "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)."
63 nil
64 '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978
65 latin-jisx0201 katakana-jisx0201)
66 (mime-charset . shift_jis)
67 (charset-origin-alist (japanese-jisx0208 "SJIS" encode-sjis-char)
68 (katakana-jisx0201 "SJIS" encode-sjis-char))))
70 (define-coding-system-alias 'shift_jis 'japanese-shift-jis)
71 (define-coding-system-alias 'sjis 'japanese-shift-jis)
72 (define-coding-system-alias 'cp932 'japanese-shift-jis)
74 (make-coding-system
75 'japanese-iso-7bit-1978-irv 2 ?j
76 "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman."
77 '((ascii japanese-jisx0208-1978 japanese-jisx0208
78 latin-jisx0201 japanese-jisx0212 katakana-jisx0201 t) nil nil nil
79 short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis)
80 '(ascii japanese-jisx0208-1978 japanese-jisx0208 latin-jisx0201))
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)
85 (make-coding-system
86 'japanese-iso-8bit 2 ?E
87 "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)."
88 '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212
89 short ascii-eol ascii-cntl nil nil single-shift)
90 '((safe-charsets ascii latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978
91 katakana-jisx0201 japanese-jisx0212)
92 (mime-charset . euc-jp)))
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)
98 (set-language-info-alist
99 "Japanese" '((setup-function . setup-japanese-environment-internal)
100 (tutorial . "TUTORIAL.ja")
101 (charset japanese-jisx0208 japanese-jisx0208-1978
102 japanese-jisx0212 latin-jisx0201 katakana-jisx0201
103 japanese-jisx0213-1 japanese-jisx0213-2)
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
107 japanese-shift-jis iso-2022-jp-2)
108 (input-method . "japanese")
109 (features japan-util)
110 (sample-text . "Japanese (\e$BF|K\8l\e(B) \e$B$3$s$K$A$O\e(B, \e(I:]FAJ\e(B")
111 (documentation . t)))
113 (provide 'japanese)
115 ;;; arch-tag: 450f5537-9d53-4d5e-b731-4cf116d8cbc9
116 ;;; japanese.el ends here