annotate admin/charsets/cp51932.awk @ 90263:80fb4c061e99

(code_conversion_restore): GCPRO arg.
author Kenichi Handa <handa@m17n.org>
date Tue, 17 Jan 2006 02:38:38 +0000
parents e0e4e6a0599f
children 9dffbad9f2a2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
89750
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
1 # cp51932.awk -- Generate a translation table for CP51932.
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
2 # Copyright (C) 2004
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
3 # National Institute of Advanced Industrial Science and Technology (AIST)
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
4 # Registration Number H13PRO009
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
5 #
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
6 # This file is part of GNU Emacs.
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
7 #
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
8 # GNU Emacs is free software; you can redistribute it and/or modify
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
9 # it under the terms of the GNU General Public License as published by
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
10 # the Free Software Foundation; either version 2, or (at your option)
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
11 # any later version.
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
12 #
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
13 # GNU Emacs is distributed in the hope that it will be useful,
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
16 # GNU General Public License for more details.
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
17 #
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
18 # You should have received a copy of the GNU General Public License
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
19 # along with GNU Emacs; see the file COPYING. If not, write to the
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
20 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
21 # Boston, MA 02111-1307, USA.
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
22
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
23 # Comment:
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
24
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
25 # Genereate a translation table for CP51932 (EUC-JP of MicroSoft Version).
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
26 # It maps invalid JISX0208 code points used by CP51932 to Unicode.
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
27 # 4th field of the input has these meanings:
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
28 # 0: JISX0208 characters.
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
29 # 1: NEC special characters.
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
30 # 2: IBM extension characters.
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
31 # 3: NEC selection of IBM extension characters.
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
32 # Among them, 1 and 3 are the target characters. 2 should have
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
33 # already been mapped to 1 or 3.
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
34
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
35 BEGIN {
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
36 print ";;; cp51932.el -- translation table for CP51932. -*- no-byte-compile: t -*-";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
37 print ";;; Automatically genrated from CP932-2BYTE.map";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
38 print "(let ((map";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
39 printf " '(;JISEXT<->UNICODE";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
40 }
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
41
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
42 /# [13]/ {
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
43 printf "\n (#x%s . #x%s)", $5 ,substr($2, 3, 4);
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
44 }
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
45
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
46 END {
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
47 print ")))";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
48 print " (mapc #'(lambda (x)";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
49 print " (setcar x (decode-char 'japanese-jisx0208 (car x))))";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
50 print " map)";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
51 print " (define-translation-table 'cp51932-decode map)";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
52 print " (mapc #'(lambda (x)";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
53 print " (let ((tmp (car x)))";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
54 print " (setcar x (cdr x)) (setcdr x tmp)))";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
55 print " map)";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
56 print " (define-translation-table 'cp51932-encode map))";
d6d9f1efd684 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
57 }
89916
e0e4e6a0599f Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents: 89750
diff changeset
58
e0e4e6a0599f Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents: 89750
diff changeset
59 # arch-tag: bbae996b-2d1c-4e85-bb55-ac30146d7504