]> git.eshelyaron.com Git - emacs.git/commitdiff
(ccl-encode-unicode-font): Lookup
authorKenichi Handa <handa@m17n.org>
Thu, 13 Oct 2005 02:25:34 +0000 (02:25 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 13 Oct 2005 02:25:34 +0000 (02:25 +0000)
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).

lisp/ChangeLog
lisp/international/fontset.el

index 3a2931dafb0fa11330b4eec180e9a7bc4defe353..1a76bf76bf061f6095b67c7d61cfee2e72657360 100644 (file)
@@ -1,3 +1,10 @@
+2005-10-13  Kenichi Handa  <handa@m17n.org>
+
+       * international/fontset.el (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).
+
 2005-10-12  Bill Wohler  <wohler@newt.com>
 
        * makefile.w32-in (MH-E-SRC): New. Used by mh-autoloads.
index c441b72166cf67cc84f7995c4e21ed451b06cd80..1e5c9508f4e1ba49506af6aa7bb778d00c6ba992 100644 (file)
        ((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