]> code.delx.au - gnu-emacs/blob - lisp/language/japanese.el
*** empty log message ***
[gnu-emacs] / lisp / language / japanese.el
1 ;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; -*-
2
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5
6 ;; Keywords: multilingual, Japanese
7
8 ;; This file is part of GNU Emacs.
9
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
14
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
24
25 ;;; Commentary:
26
27 ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are
28 ;; supported.
29
30 ;;; Code:
31
32 (define-coding-system 'iso-2022-jp
33 "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)."
34 :coding-type 'iso-2022
35 :mnemonic ?J
36 :designation [(ascii japanese-jisx0208-1978 japanese-jisx0208
37 latin-jisx0201 japanese-jisx0212)
38 nil nil nil]
39 :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation)
40 :charset-list '(ascii japanese-jisx0208-1978 japanese-jisx0208
41 latin-jisx0201 japanese-jisx0212)
42 :mime-charset 'iso-2022-jp)
43
44 (define-coding-system-alias 'junet 'iso-2022-jp)
45
46 (define-coding-system 'iso-2022-jp-2
47 "ISO 2022 based 7bit encoding for CJK, Latin-1, Greek (MIME:ISO-2022-JP-2)."
48 :coding-type 'iso-2022
49 :mnemonic ?J
50 :designation [(ascii japanese-jisx0208-1978 japanese-jisx0208
51 latin-jisx0201 japanese-jisx0212
52 chinese-gb2312 korean-ksc5601)
53 nil
54 (nil latin-iso8859-1 greek-iso8859-7)
55 nil]
56 :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation single-shift
57 init-at-bol)
58 :charset-list '(ascii japanese-jisx0208-1978 japanese-jisx0208
59 latin-jisx0201 japanese-jisx0212
60 chinese-gb2312 korean-ksc5601
61 latin-iso8859-1 greek-iso8859-7)
62 :mime-charset 'iso-2022-jp-2)
63
64 (define-coding-system 'japanese-shift-jis
65 "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)"
66 :coding-type 'shift-jis
67 :mnemonic ?S
68 :charset-list '(ascii katakana-jisx0201 japanese-jisx0208)
69 :mime-charset 'shift_jis)
70
71 (define-coding-system-alias 'shift_jis 'japanese-shift-jis)
72 (define-coding-system-alias 'sjis 'japanese-shift-jis)
73 ;; Fixme: AKA Shift-JIS according to
74 ;; <URL:http://www.microsoft.com/globaldev/reference/WinCP.asp>. Is
75 ;; that correct?
76
77 (define-coding-system 'japanese-iso-7bit-1978-irv
78 "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman."
79 :coding-type 'iso-2022
80 :mnemonic ?j
81 :designation [(latin-jisx0201 japanese-jisx0208-1978 japanese-jisx0208
82 japanese-jisx0212 katakana-jisx0201)
83 nil nil nil]
84 :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation
85 use-roman use-oldjis)
86 :charset-list '(ascii latin-jisx0201 japanese-jisx0208-1978 japanese-jisx0208
87 japanese-jisx0212))
88
89 (define-coding-system-alias 'iso-2022-jp-1978-irv 'japanese-iso-7bit-1978-irv)
90 (define-coding-system-alias 'old-jis 'japanese-iso-7bit-1978-irv)
91
92 (define-coding-system 'japanese-iso-8bit
93 "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)."
94 :coding-type 'iso-2022
95 :mnemonic ?E
96 :designation [ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212]
97 :flags '(short ascii-at-eol ascii-at-cntl single-shift)
98 :charset-list '(ascii latin-jisx0201 japanese-jisx0208
99 japanese-jisx0208-1978
100 katakana-jisx0201 japanese-jisx0212)
101 :mime-charset 'euc-jp)
102
103 (define-coding-system-alias 'euc-japan-1990 'japanese-iso-8bit)
104 (define-coding-system-alias 'euc-japan 'japanese-iso-8bit)
105 (define-coding-system-alias 'euc-jp 'japanese-iso-8bit)
106
107 (set-language-info-alist
108 "Japanese" '((setup-function . setup-japanese-environment-internal)
109 (exit-function . exit-japanese-environment)
110 (tutorial . "TUTORIAL.ja")
111 (charset japanese-jisx0208 japanese-jisx0208-1978
112 japanese-jisx0212 latin-jisx0201 katakana-jisx0201
113 japanese-jisx0213-1 japanese-jisx0213-2)
114 (coding-system iso-2022-jp japanese-iso-8bit
115 japanese-shift-jis japanese-iso-7bit-1978-irv)
116 (coding-priority iso-2022-jp japanese-iso-8bit
117 japanese-shift-jis iso-2022-jp-2)
118 (input-method . "japanese")
119 (features japan-util)
120 (sample-text . "Japanese (\e$BF|K\8l\e(B) \e$B$3$s$K$A$O\e(B, \e(I:]FAJ\e(B")
121 (documentation . t)))
122
123 (provide 'japanese)
124
125 ;;; japanese.el ends here