emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to admin/charsets/cp51932.awk


From: Miles Bader
Subject: [Emacs-diffs] Changes to admin/charsets/cp51932.awk
Date: Fri, 01 Feb 2008 16:04:25 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     08/02/01 16:01:31

Index: admin/charsets/cp51932.awk
===================================================================
RCS file: admin/charsets/cp51932.awk
diff -N admin/charsets/cp51932.awk
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ admin/charsets/cp51932.awk  1 Feb 2008 16:01:00 -0000       1.2
@@ -0,0 +1,59 @@
+# cp51932.awk -- Generate a translation table for CP51932.
+# Copyright (C) 2004
+#   National Institute of Advanced Industrial Science and Technology (AIST)
+#   Registration Number H13PRO009
+#
+# This file is part of GNU Emacs.
+#
+# GNU Emacs is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Emacs is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Emacs; see the file COPYING.  If not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Comment:
+
+# Genereate a translation table for CP51932 (EUC-JP of MicroSoft Version).
+# It maps invalid JISX0208 code points used by CP51932 to Unicode.
+# 4th field of the input has these meanings:
+#   0: JISX0208 characters.
+#   1: NEC special characters.
+#   2: IBM extension characters.
+#   3: NEC selection of IBM extension characters.
+# Among them, 1 and 3 are the target characters.  2 should have
+# already been mapped to 1 or 3.
+
+BEGIN {
+  print ";;; cp51932.el -- translation table for CP51932. -*- no-byte-compile: 
t -*-";
+  print ";;; Automatically genrated from CP932-2BYTE.map";
+  print "(let ((map";
+  printf "       '(;JISEXT<->UNICODE";
+}
+
+/# [13]/ {
+  printf "\n    (#x%s . #x%s)", $5 ,substr($2, 3, 4);
+}
+
+END {
+  print ")))";
+  print "  (mapc #'(lambda (x)";
+  print "          (setcar x (decode-char 'japanese-jisx0208 (car x))))";
+  print "      map)";
+  print "  (define-translation-table 'cp51932-decode map)";
+  print "  (mapc #'(lambda (x)";
+  print "          (let ((tmp (car x)))";
+  print "            (setcar x (cdr x)) (setcdr x tmp)))";
+  print "      map)";
+  print "  (define-translation-table 'cp51932-encode map))";
+}
+
+# arch-tag: bbae996b-2d1c-4e85-bb55-ac30146d7504




reply via email to

[Prev in Thread] Current Thread [Next in Thread]