From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Possible change to startup.el Date: Fri, 25 Mar 2005 21:51:28 +0900 (JST) Message-ID: <200503251251.VAA19321@etlken.m17n.org> References: <87psxq1n7w.fsf@jurta.org> <20050323.190146.104245427.wl@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1111755519 10983 80.91.229.2 (25 Mar 2005 12:58:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Mar 2005 12:58:39 +0000 (UTC) Cc: juri@jurta.org, ttn@glug.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 25 13:58:39 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DEoOP-00023Y-EV for ged-emacs-devel@m.gmane.org; Fri, 25 Mar 2005 13:58:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DEodt-0006Ce-HG for ged-emacs-devel@m.gmane.org; Fri, 25 Mar 2005 08:14:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DEocT-0005fN-6X for emacs-devel@gnu.org; Fri, 25 Mar 2005 08:12:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DEocM-0005bD-Am for emacs-devel@gnu.org; Fri, 25 Mar 2005 08:12:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DEocK-0005a8-DM for emacs-devel@gnu.org; Fri, 25 Mar 2005 08:12:50 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1DEoI1-0001X6-E5; Fri, 25 Mar 2005 07:51:50 -0500 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j2PCpTdY004779; Fri, 25 Mar 2005 21:51:29 +0900 Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j2PCpSDI017176; Fri, 25 Mar 2005 21:51:28 +0900 Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id VAA19321; Fri, 25 Mar 2005 21:51:28 +0900 (JST) Original-To: Werner LEMBERG In-reply-to: <20050323.190146.104245427.wl@gnu.org> (message from Werner LEMBERG on Wed, 23 Mar 2005 19:01:46 +0100 (CET)) 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) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:35144 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35144 In article <20050323.190146.104245427.wl@gnu.org>, Werner LEMBERG 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 handa@m17n.org