(defvar ucs-mule-to-mule-unicode (make-translation-table)
"Translation table for encoding to `mule-utf-8'.")
-;; Could have been done by ucs-tables loaded before.
-(unless (get 'ucs-mule-to-mule-unicode 'translation-table)
- (define-translation-table 'ucs-mule-to-mule-unicode
- ucs-mule-to-mule-unicode))
+(define-translation-table 'ucs-mule-to-mule-unicode
+ ucs-mule-to-mule-unicode)
(defvar utf-8-subst-table (make-hash-table :test 'eq))
(defvar utf-8-subst-rev-table (make-hash-table :test 'eq))
;; space of mule-unicode. For Latin scripts this isn't very
;; important. Hebrew and Arabic might go here too when there's proper
;; support for them.
+(defvar utf-8-fragmentation-table (make-translation-table)
+ "Char table normally mapping non-Latin mule-unicode-... characters to iso8859.
+Used as the value of `utf-8-translation-table-for-decode' in
+`utf-8-fragment-on-decoding' mode.")
(mapc
(lambda (pair)
- (aset utf-8-translation-table-for-decode (car pair) (cdr pair)))
+ (aset utf-8-fragmentation-table (car pair) (cdr pair)))
'((?\e$,1&d\e(B . ?\e,F4\e(B) (?\e$,1&e\e(B . ?\e,F5\e(B) (?\e$,1&f\e(B . ?\e,F6\e(B) (?\e$,1&h\e(B . ?\e,F8\e(B) (?\e$,1&i\e(B . ?\e,F9\e(B)
(?\e$,1&j\e(B . ?\e,F:\e(B) (?\e$,1&l\e(B . ?\e,F<\e(B) (?\e$,1&n\e(B . ?\e,F>\e(B) (?\e$,1&o\e(B . ?\e,F?\e(B) (?\e$,1&p\e(B . ?\e,F@\e(B)
(?\e$,1&q\e(B . ?\e,FA\e(B) (?\e$,1&r\e(B . ?\e,FB\e(B) (?\e$,1&s\e(B . ?\e,FC\e(B) (?\e$,1&t\e(B . ?\e,FD\e(B) (?\e$,1&u\e(B . ?\e,FE\e(B)
Setting this variable outside customize has no effect."
:set (lambda (s v)
- (if v
- (define-translation-table 'utf-8-translation-table-for-decode
- utf-8-translation-table-for-decode)
- (define-translation-table 'utf-8-translation-table-for-decode))
+ (setq utf-8-translation-table-for-decode
+ (if v
+ utf-8-fragmentation-table
+ (make-char-table)))
+ (define-translation-table 'utf-8-translation-table-for-decode
+ utf-8-translation-table-for-decode)
(set-default s v))
:version "21.4"
:type 'boolean