changeset 52725:dd3cff7e93d7

(ccl-decode-mule-utf-8): Lookup utf-subst-table-for-decode even for U+E000..U+FFFF.
author Kenichi Handa <handa@m17n.org>
date Thu, 02 Oct 2003 00:49:04 +0000
parents 22bb6971e35f
children fc4c2a3edbb0
files lisp/international/utf-8.el
diffstat 1 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/utf-8.el	Thu Oct 02 00:47:40 2003 +0000
+++ b/lisp/international/utf-8.el	Thu Oct 02 00:49:04 2003 +0000
@@ -448,12 +448,19 @@
 
 			    ;; mule-unicode-e000-ffff
 			    ;; Fixme: fffe and ffff are invalid.
-			    ((r0 = ,(charset-id 'mule-unicode-e000-ffff))
-			     (r3 -= #xe000)
-			     (r3 //= 96)
-			     (r1 = (r7 + 32))
-			     (r1 += ((r3 + 32) << 7))
-			     (write-multibyte-character r0 r1)))))))))
+			    ((r4 = r3)	; don't zap r3
+			     (lookup-integer utf-subst-table-for-decode r4 r5)
+			     (if r7
+				 ;; got a translation
+				 ((write-multibyte-character r4 r5)
+				  ;; Zapped through register starvation.
+				  (r5 = ,(charset-id 'eight-bit-control)))
+			       ((r0 = ,(charset-id 'mule-unicode-e000-ffff))
+				(r3 -= #xe000)
+				(r3 //= 96)
+				(r1 = (r7 + 32))
+				(r1 += ((r3 + 32) << 7))
+				(write-multibyte-character r0 r1)))))))))))
 
 	      (if (r0 < #xfe)
 		  ;; 4byte encoding