[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible change to startup.el
From: |
Kenichi Handa |
Subject: |
Re: Possible change to startup.el |
Date: |
Fri, 25 Mar 2005 21:51:28 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Werner LEMBERG <address@hidden> writes:
> For this Thai text string (in UTF-8 encoding) I just get boxes. Doing
> `C-u C-x =' I see that the characters are taken from the
> `mule-unicode-0100-24ff' charset; the font I use for it
> (-Efont-Biwidth-Medium-R-Normal--24-240-75-75-P-120-ISO10646-1)
> doesn't have them. On the other hand, TIS-620 encoding displays just
> fine. How can I make Emacs use my TIS-620 font for Thai characters if
> the encoding is UTF-8? Neither emacs.info nor elisp.info give a clue.
Emacs is still not that good at handling Unicode characters.
It is better to use/recommend the charset thai-tis620 for
Thai characters for the moment.
It's possible to display Thai characters in
mule-unicode-0100-24ff by TIS-620 font by the attached code.
But, I don't want to commit such an adhoc code at this
moment.
(define-translation-table 'thai-tis620-encode-table
ucs-thai-tis620-encode-table)
(define-ccl-program ccl-encode-tis620-font
'(0
((if (r2 > 0)
((r1 = ((r1 << 7) | r2))
(r2 = 0)
(translate-character thai-tis620-encode-table r0 r1)))
(r1 |= #x80)))
"CCL program to encode Thai characters to TIS620 font.")
(add-to-list 'font-ccl-encoder-alist '("tis620" . ccl-encode-tis620-font))
(set-fontset-font
"fontset-default"
(cons (decode-char 'ucs #x0E00)
(decode-char 'ucs #x0E7F))
'(nil . "tis620"))
Another way is to use setup utf-fragmentation-table property
and set utf-fragment-on-decoding to t so that Emacs decodes
Thai characters in utf-8 not to mule-unicode-0100-24ff but
to thai-tis620. But, that is also fairly an adhoc way.
---
Ken'ichi HANDA
address@hidden
- Re: Possible change to startup.el, (continued)
- Re: Possible change to startup.el, Juri Linkov, 2005/03/22
- Re: Possible change to startup.el, Eli Zaretskii, 2005/03/22
- Re: Possible change to startup.el, David Kastrup, 2005/03/22
- Re: Possible change to startup.el, Eli Zaretskii, 2005/03/22
- Re: Possible change to startup.el, David Kastrup, 2005/03/22
Re: Possible change to startup.el, Richard Stallman, 2005/03/22
Re: Possible change to startup.el, Richard Stallman, 2005/03/23
Re: Possible change to startup.el, Richard Stallman, 2005/03/22
Re: Possible change to startup.el, Thien-Thi Nguyen, 2005/03/24
Re: Possible change to startup.el, Thien-Thi Nguyen, 2005/03/25