changeset 29922:9473e3466947

(cp-coding-system-for-codepage-1): Doc fix. (cp864-decode-table): Doc fix. (cp720-decode-table): New variable, supports the Arabic OEM codepage used by Windows. (cp737-decode-table): New, Greek OEM codepage used by Windows.
author Eli Zaretskii <eliz@gnu.org>
date Sun, 25 Jun 2000 10:09:30 +0000
parents 8a4552214d84
children 3c4322d4f35e
files lisp/international/codepage.el
diffstat 1 files changed, 45 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/codepage.el	Sat Jun 24 06:06:53 2000 +0000
+++ b/lisp/international/codepage.el	Sun Jun 25 10:09:30 2000 +0000
@@ -1,10 +1,10 @@
-;;; codepage.el --- MS-DOS specific coding systems.
+;;; codepage.el --- MS-DOS/MS-Windows specific coding systems.
 
 ;; Copyright (C) 1998 Free Software Foundation, Inc.
 
 ;; Author: Eli Zaretskii
 ;; Maintainer: FSF
-;; Keywords: i18n ms-dos codepage
+;; Keywords: i18n ms-dos ms-windows codepage
 
 ;; This file is part of GNU Emacs.
 
@@ -25,16 +25,16 @@
 
 ;;; Commentary:
 
-;; Special coding systems for DOS codepage support.
+;; Special coding systems for DOS/Windows codepage support.
 ;;
-;; These coding systems perform conversion from the DOS codepage encoding
-;; to one of the ISO-8859 character sets.  Each codepage has its corresponding
-;; ISO-8859 charset, chosen so as to be able to convert all (or most) of the
-;; characters.  The idea is that Emacs internally works with the usual MULE
-;; charsets, and the conversion to and from the DOS codepage is performed
-;; on I/O only.
-;; See term/internal.el for the complementary setup of the DOS terminal
-;; display and input methods.
+;; These coding systems perform conversion from the DOS/Windows
+;; codepage encoding to one of the ISO-8859 character sets.  Each
+;; codepage has its corresponding ISO-8859 charset, chosen so as to be
+;; able to convert all (or most) of the characters.  The idea is that
+;; Emacs internally works with the usual MULE charsets, and the
+;; conversion to and from the DOS codepage is performed on I/O only.
+;; See term/internal.el for the complementary setup of the DOS
+;; terminal display and input methods.
 ;;
 ;; Thanks to Ken'ichi Handa <handa@etl.go.jp> for writing the CCL
 ;; encoders/decoders, and for help in debugging this code. 
@@ -50,12 +50,7 @@
 DECODER is a translation table for converting characters in the DOS codepage
 encoding to Emacs multibyte characters.
 ENCODER is a translation table for encoding Emacs multibyte characters into
-external DOS codepage codes.
-
-Note that the coding systems created by this function support automatic
-detection of the EOL format.  However, the decoders and encoders created
-for these coding systems only support DOS and Unix style EOLs (the -mac
-variety is actually just an alias for the -unix variety)."
+external DOS codepage codes."
   (save-match-data
     (let* ((coding-name (symbol-name coding))
 	   (undef (if (eq system-type 'ms-dos)
@@ -67,7 +62,7 @@
 	    (ccl-compile
 	     ;; The 4 here supplies the buf_magnification parameter
 	     ;; for the CCL program.  A multibyte character may take
-	     ;; at most 4-byte.
+	     ;; at most 4-bytes.
 	     `(4 (loop (read r1)
 		       (if (r1 >= 128)
 			   ((r0 = ,(charset-id 'ascii))
@@ -300,7 +295,7 @@
 (defvar cp862-decode-table
   ;; Nth element is the code of a cp862 glyph for the multibyte
   ;; character created by (make-char 'hebrew-iso8859-8 (+ N 160)).
-  ;; The element nil means there's no corresponding cp850 glyph.
+  ;; The element nil means there's no corresponding cp862 glyph.
   [
    255 173 155 156 nil 157 179 nil nil nil nil 174 170 196 nil nil
    248 241 253 nil nil 230 nil 249 nil nil 246 175 172 171 nil nil
@@ -336,10 +331,26 @@
    208 209 210 188 189 190 235 215 216 223 238 nil nil nil nil nil
    224 247 248 252 251 239 242 243 232 233 253 nil nil nil nil nil
    nil 241 nil nil nil nil nil nil nil nil nil nil nil nil nil nil]
-  "Table for converting ISO-8859-1 characters into codepage 863 glyphs.")
+  "Table for converting ISO-8859-6 characters into codepage 864 glyphs.")
 (setplist 'cp864-decode-table
 	  '(charset arabic-iso8859-6 language nil offset 160))
 
+;; Arabic OEM codepage used by Windows
+;; FIXME: Emacs doesn't seem to support the "Arabic" language
+;; environment yet.  So this is only partially usable, for now
+(defvar cp720-decode-table
+  [
+   255 nil nil nil 148 nil nil nil nil nil nil nil nil 196 nil nil
+   nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
+   nil 152 153 154 155 157 158 159 160 161 162 163 164 165 166 167
+   168 169 170 171 172 173 224 225 226 227 228 nil nil nil nil nil
+   149 229 231 232 233 234 235 236 237 238 239 241 242 243 244 245
+   246 145 146 nil nil nil nil nil nil nil nil nil nil nil nil nil]
+  "Table for converting ISO-8859-6 characters into codepage 720 glyphs.")
+(setplist 'cp720-decode-table
+	  '(charset arabic-iso8859-6 language nil offset 160))
+
+
 ;; Nordic (Norwegian/Danish)
 (defvar cp865-decode-table
   [
@@ -366,6 +377,19 @@
 (setplist 'cp869-decode-table
 	  '(charset greek-iso8859-7 language "Greek" offset 160))
 
+;; Greek OEM codepage used by Windows
+(defvar cp737-decode-table
+  [
+   255 nil nil nil nil nil 179 nil nil nil nil nil nil 196 nil nil
+   248 241 253 nil nil nil 234 250 235 236 237 nil 238 nil 239 240
+   nil 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
+   143 144 nil 145 146 147 148 149 150 151 244 245 225 226 227 229
+   nil 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
+   167 168 170 169 171 172 173 174 175 224 228 232 230 231 233 nil]
+  "Table for converting ISO-8859-7 characters into codepage 737 glyphs.")
+(setplist 'cp737-decode-table
+	  '(charset greek-iso8859-7 language "Greek" offset 160))
+
 ;; Conversion from codepage 775 to Latin-4 for Baltic countries.
 (defvar cp775-decode-table
   [
@@ -383,7 +407,7 @@
 ;; butchered from the ISO-8859 specs. This does not add support for
 ;; the extended characters that MS has added in the 128 - 159 coding
 ;; range, only translates those characters that can be expressed in
-;; the corresponding iso-8859 codepage.
+;; the corresponding iso-8859 charset.
 
 ;; Codepage Mapping:
 ;;