# HG changeset patch # User Kenichi Handa # Date 1129170263 0 # Node ID 17f02a9e1c9954cc17dccb07bea0873058809031 # Parent 702baea25eb3e98b2191611385013b0b89411924 (ccl-encode-unicode-font): Lookup utf-subst-table-for-encode, not ucs-mule-cjk-to-unicode. Handle the case that ucs-mule-to-mule-unicode translates a character to ASCII (usually for IPA characters). diff -r 702baea25eb3 -r 17f02a9e1c99 lisp/international/fontset.el --- a/lisp/international/fontset.el Wed Oct 12 23:06:20 2005 +0000 +++ b/lisp/international/fontset.el Thu Oct 13 02:24:23 2005 +0000 @@ -173,39 +173,42 @@ ((if (r2 >= 0) ;; This is a 2D charset. (r1 = ((r1 << 7) | r2))) - (lookup-character ucs-mule-cjk-to-unicode r0 r1) + (lookup-character utf-subst-table-for-encode r0 r1) (if r7 ;; We got it! ((r1 = (r0 >> 8)) (r2 = (r0 & #xFF))) ;; Look for a translation for non-ASCII chars. ((translate-character ucs-mule-to-mule-unicode r0 r1) - (if (r0 == ,(charset-id 'latin-iso8859-1)) - ((r2 = (r1 + 128)) + (if (r0 == ,(charset-id 'ascii)) + ((r2 = r1) (r1 = 0)) - ((r2 = (r1 & #x7F)) - (r1 >>= 7) - (if (r0 == ,(charset-id 'mule-unicode-0100-24ff)) - ((r1 *= 96) - (r1 += r2) - (r1 += ,(- #x100 (* 32 96) 32)) - (r1 >8= 0) - (r2 = r7)) - (if (r0 == ,(charset-id 'mule-unicode-2500-33ff)) - ((r1 *= 96) - (r1 += r2) - (r1 += ,(- #x2500 (* 32 96) 32)) - (r1 >8= 0) - (r2 = r7)) - (if (r0 == ,(charset-id 'mule-unicode-e000-ffff)) - ((r1 *= 96) - (r1 += r2) - (r1 += ,(- #xe000 (* 32 96) 32)) - (r1 >8= 0) - (r2 = r7)) - ;; No way, use the glyph for U+FFFD. - ((r1 = #xFF) - (r2 = #xFD))))))))))))) + ((if (r0 == ,(charset-id 'latin-iso8859-1)) + ((r2 = (r1 + 128)) + (r1 = 0)) + ((r2 = (r1 & #x7F)) + (r1 >>= 7) + (if (r0 == ,(charset-id 'mule-unicode-0100-24ff)) + ((r1 *= 96) + (r1 += r2) + (r1 += ,(- #x100 (* 32 96) 32)) + (r1 >8= 0) + (r2 = r7)) + (if (r0 == ,(charset-id 'mule-unicode-2500-33ff)) + ((r1 *= 96) + (r1 += r2) + (r1 += ,(- #x2500 (* 32 96) 32)) + (r1 >8= 0) + (r2 = r7)) + (if (r0 == ,(charset-id 'mule-unicode-e000-ffff)) + ((r1 *= 96) + (r1 += r2) + (r1 += ,(- #xe000 (* 32 96) 32)) + (r1 >8= 0) + (r2 = r7)) + ;; No way, use the glyph for U+FFFD. + ((r1 = #xFF) + (r2 = #xFD))))))))))))))) "Encode characters for display with iso10646 font. Translate through the translation-hash-table named `ucs-mule-cjk-to-unicode' and the translation-table named