]> code.delx.au - gnu-emacs/blobdiff - lisp/international/codepage.el
(sgml-html-meta-auto-coding-function):
[gnu-emacs] / lisp / international / codepage.el
index 01bf5a2053280276f2f241239c523c65a18bf3ac..c94b2798f5964a4f1fe1a9627ff7656bb28eb411 100644 (file)
@@ -37,7 +37,7 @@
 ;; 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. 
+;; encoders/decoders, and for help in debugging this code.
 
 ;;; Code:
 
@@ -384,7 +384,7 @@ character is generated by (make-char CHARSET OFFSET)."
    128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
    144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
    160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
-   223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
+   224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
    252 241 nil nil 243 nil nil 245 nil nil nil nil nil nil 247 nil]
   "Table for converting ISO-8859-5 characters into codepage 866 glyphs.")
 (setplist 'cp866-decode-table
@@ -666,6 +666,26 @@ read/written by MS-DOS software, or for display on the MS-DOS terminal."
        (cp-make-coding-systems-for-codepage
         cp (cp-charset-for-codepage cp) (cp-offset-for-codepage cp)))))
 
+;; Add DOS codepages to `non-iso-charset-alist'.
+(eval-after-load "mule-diag"
+  '(let ((tail (cp-supported-codepages))
+        elt)
+     (while tail
+       (setq elt (car tail) tail (cdr tail))
+       ;; Now ELT is (CODEPAGE . CHARSET), where CODEPAGE is a string
+       ;; (e.g. "850"), CHARSET is a charset that characters in CODEPAGE
+       ;; are mapped to.
+       (unless (assq (intern (concat "cp" (car elt))) non-iso-charset-alist)
+        (setq non-iso-charset-alist
+              (cons (list (intern (concat "cp" (car elt)))
+                          (list 'ascii (cdr elt))
+                          `(lambda (code)
+                             (decode-codepage-char ,(string-to-int (car elt))
+                                                   code))
+                          (list (list 0 255)))
+                    non-iso-charset-alist))))))
+
 (provide 'codepage)
 
+;;; arch-tag: 80328de8-b94e-4386-be26-5876105731f0
 ;;; codepage.el ends here