aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii1999-02-08 11:21:00 +0000
committerEli Zaretskii1999-02-08 11:21:00 +0000
commita7bc7c2a69a452d7fa57ee3f4d2ad47ae44b0cb5 (patch)
tree66fc6616f189b895d1fbf8c5f7b55b71eb8d0369
parent489427668fc75cd4df6ef69b1caafab5ef69aa7b (diff)
downloademacs-a7bc7c2a69a452d7fa57ee3f4d2ad47ae44b0cb5.tar.gz
emacs-a7bc7c2a69a452d7fa57ee3f4d2ad47ae44b0cb5.zip
(cp-coding-system-for-codepage-1): On MS-DOS,
use dos-unsupported-char-glyph for characters not supported by the codepage. (cp-make-coding-systems-for-codepage): Likewise.
-rw-r--r--lisp/international/codepage.el18
1 files changed, 14 insertions, 4 deletions
diff --git a/lisp/international/codepage.el b/lisp/international/codepage.el
index f4990ec2104..9d5e7872cb6 100644
--- a/lisp/international/codepage.el
+++ b/lisp/international/codepage.el
@@ -58,6 +58,11 @@ for these coding systems only support DOS and Unix style EOLs (the -mac
58variety is actually just an alias for the -unix variety)." 58variety is actually just an alias for the -unix variety)."
59 (save-match-data 59 (save-match-data
60 (let* ((coding-name (symbol-name coding)) 60 (let* ((coding-name (symbol-name coding))
61 (undef (if (eq system-type 'ms-dos)
62 (if dos-unsupported-char-glyph
63 (logand dos-unsupported-char-glyph 255)
64 127)
65 ??))
61 (ccl-decoder-dos 66 (ccl-decoder-dos
62 (ccl-compile 67 (ccl-compile
63 `(4 (loop (read r1) 68 `(4 (loop (read r1)
@@ -89,7 +94,7 @@ variety is actually just an alias for the -unix variety)."
89 (if (r0 != ,(charset-id 'ascii)) 94 (if (r0 != ,(charset-id 'ascii))
90 ((translate-character ,encoder r0 r1) 95 ((translate-character ,encoder r0 r1)
91 (if (r0 == ,(charset-id 'japanese-jisx0208)) 96 (if (r0 == ,(charset-id 'japanese-jisx0208))
92 ((r1 = ??) 97 ((r1 = ,undef)
93 (write r1)))))) 98 (write r1))))))
94 (write-repeat r1))))) 99 (write-repeat r1)))))
95 (ccl-encoder-unix 100 (ccl-encoder-unix
@@ -98,7 +103,7 @@ variety is actually just an alias for the -unix variety)."
98 (if (r0 != ,(charset-id 'ascii)) 103 (if (r0 != ,(charset-id 'ascii))
99 ((translate-character ,encoder r0 r1) 104 ((translate-character ,encoder r0 r1)
100 (if (r0 == ,(charset-id 'japanese-jisx0208)) 105 (if (r0 == ,(charset-id 'japanese-jisx0208))
101 ((r1 = ??) 106 ((r1 = ,undef)
102 (write r1))))) 107 (write r1)))))
103 (write-repeat r1)))))) 108 (write-repeat r1))))))
104 (if (memq coding coding-system-list) 109 (if (memq coding coding-system-list)
@@ -436,14 +441,19 @@ decoder and encoder created by this function."
436 ;; For charsets other than ascii and ISO-NAME, set `?' for 441 ;; For charsets other than ascii and ISO-NAME, set `?' for
437 ;; one-column charsets, and some Japanese character for 442 ;; one-column charsets, and some Japanese character for
438 ;; wide-column charsets. CCL encoder convert that Japanese 443 ;; wide-column charsets. CCL encoder convert that Japanese
439 ;; character to "??". 444 ;; character to either dos-unsupported-char-glyph or "??".
440 (let ((tbl (char-table-extra-slot (symbol-value nonascii-table) 0)) 445 (let ((tbl (char-table-extra-slot (symbol-value nonascii-table) 0))
446 (undef (if (eq system-type 'ms-dos)
447 (if dos-unsupported-char-glyph
448 (logand dos-unsupported-char-glyph 255)
449 127)
450 ??))
441 (charsets (delq 'ascii (delq iso-name 451 (charsets (delq 'ascii (delq iso-name
442 (copy-sequence charset-list)))) 452 (copy-sequence charset-list))))
443 (wide-column-char (make-char 'japanese-jisx0208 32 32))) 453 (wide-column-char (make-char 'japanese-jisx0208 32 32)))
444 (while charsets 454 (while charsets
445 (aset tbl (make-char (car charsets)) 455 (aset tbl (make-char (car charsets))
446 (if (= (charset-width (car charsets)) 1) ?? wide-column-char)) 456 (if (= (charset-width (car charsets)) 1) undef wide-column-char))
447 (setq charsets (cdr charsets)))) 457 (setq charsets (cdr charsets))))
448 (define-translation-table decode-translation 458 (define-translation-table decode-translation
449 (symbol-value nonascii-table)) 459 (symbol-value nonascii-table))