db6209780a9c52793324513562bed1b7b857d4e5
[bpt/emacs.git] / lisp / language / japanese.el
1 ;;; japanese.el --- Japanese support
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-alias 'iso-2022-jp 'iso-2022-7bit)
33 (define-coding-system-alias 'junet 'iso-2022-7bit)
34
35 (make-coding-system
36 'japanese-shift-jis 1 ?S
37 "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)")
38
39 (define-coding-system-alias 'shift_jis 'japanese-shift-jis)
40 (define-coding-system-alias 'sjis 'japanese-shift-jis)
41
42 (make-coding-system
43 'japanese-iso-7bit-1978-irv 2 ?j
44 "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman"
45 '((ascii t) nil nil nil
46 short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis))
47
48 (define-coding-system-alias 'iso-2022-jp-1978-irv 'japanese-iso-7bit-1978-irv)
49 (define-coding-system-alias 'old-jis 'japanese-iso-7bit-1978-irv)
50
51 (make-coding-system
52 'japanese-iso-8bit 2 ?E
53 "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)"
54 '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212
55 short ascii-eol ascii-cntl nil nil single-shift))
56
57 (define-coding-system-alias 'euc-japan-1990 'japanese-iso-8bit)
58 (define-coding-system-alias 'euc-japan 'japanese-iso-8bit)
59 (define-coding-system-alias 'euc-jp 'japanese-iso-8bit)
60
61 (set-language-info-alist
62 "Japanese" '((setup-function . setup-japanese-environment)
63 (tutorial . "TUTORIAL.jp")
64 (charset . (japanese-jisx0208 japanese-jisx0208-1978
65 japanese-jisx0212 latin-jisx0201
66 katakana-jisx0201))
67 (coding-system . (iso-2022-7bit japanese-iso-8bit
68 japanese-shift-jis japanese-iso-7bit-1978-irv))
69 (sample-text . "Japanese (\e$BF|K\8l\e(B) \e$B$3$s$K$A$O\e(B, \e(I:]FAJ\e(B")
70 (documentation . t)))
71
72 ;;; japanese.el ends here