all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: juri@jurta.org, ttn@glug.org, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Possible change to startup.el
Date: Fri, 25 Mar 2005 21:51:28 +0900 (JST)	[thread overview]
Message-ID: <200503251251.VAA19321@etlken.m17n.org> (raw)
In-Reply-To: <20050323.190146.104245427.wl@gnu.org> (message from Werner LEMBERG on Wed, 23 Mar 2005 19:01:46 +0100 (CET))

In article <20050323.190146.104245427.wl@gnu.org>, Werner LEMBERG <wl@gnu.org> 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

  reply	other threads:[~2005-03-25 12:51 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-21 18:44 Possible change to startup.el David Kastrup
2005-03-21 20:50 ` Thien-Thi Nguyen
2005-03-21 21:10   ` David Kastrup
2005-03-21 21:25     ` Andreas Schwab
2005-03-21 22:14       ` David Kastrup
2005-03-22  0:03         ` Andreas Schwab
2005-03-22  1:38         ` David Hansen
2005-03-23 18:25         ` James Cloos
2005-03-27  3:53           ` Richard Stallman
2005-03-22  4:55   ` Eli Zaretskii
2005-03-22  6:24     ` Miles Bader
2005-03-22  8:15       ` Kenichi Handa
2005-03-22  8:27         ` Miles Bader
2005-03-22 10:40           ` David Kastrup
2005-03-22 12:44             ` Jason Rumney
2005-03-22 20:31             ` Werner LEMBERG
2005-03-22 11:23           ` Kenichi Handa
2005-03-22 12:33           ` Juri Linkov
2005-03-22 19:32       ` Eli Zaretskii
2005-03-22 10:18     ` David Kastrup
2005-03-22 19:34       ` Eli Zaretskii
2005-03-22 22:24         ` David Kastrup
2005-03-22 20:44   ` Richard Stallman
2005-03-22 22:32     ` Thien-Thi Nguyen
2005-03-23  6:21       ` Richard Stallman
2005-03-23 13:55         ` Juri Linkov
2005-03-23 18:01           ` Werner LEMBERG
2005-03-25 12:51             ` Kenichi Handa [this message]
2005-03-23 20:25           ` Richard Stallman
2005-03-22 13:57 ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2005-03-24 10:49 Thien-Thi Nguyen
2005-03-24 19:05 ` Miles Bader
2005-03-25  6:43 ` Richard Stallman
2005-03-25 18:07 Thien-Thi Nguyen
2005-03-27  3:52 ` Richard Stallman
2005-03-27 23:15   ` Juri Linkov
2005-03-28 22:53     ` Richard Stallman
2005-03-29 20:19       ` Thien-Thi Nguyen
2005-03-30  4:08         ` Marcelo Toledo
2005-03-30  9:42           ` Thien-Thi Nguyen
2005-03-30 22:47 Thien-Thi Nguyen
2005-03-30 23:38 ` David Kastrup
2005-04-01  4:11   ` Richard Stallman
2005-03-31  1:40 ` Miles Bader
2005-03-31  1:02   ` Marcelo Toledo
2005-03-31  3:20     ` Miles Bader
2005-03-31  2:21       ` Marcelo Toledo
2005-03-31  6:59 ` Juri Linkov
2005-04-01  4:11 ` Richard Stallman
2005-03-31 11:37 Thien-Thi Nguyen
2005-03-31 12:05 ` Miles Bader
2005-03-31 13:32   ` Thien-Thi Nguyen
2005-03-31 14:29     ` Miles Bader
2005-03-31 16:15       ` Thien-Thi Nguyen
2005-03-31 22:23         ` Miles Bader
2005-04-01  4:10   ` Richard Stallman
2005-03-31 12:01 Thien-Thi Nguyen
2005-03-31 12:59 ` Kim F. Storm
2005-03-31 13:43   ` David Kastrup
2005-03-31 22:19     ` Kim F. Storm
2005-04-01  4:10   ` Richard Stallman
2005-04-01  4:03 ` Juri Linkov
2005-04-03  5:20   ` Richard Stallman
2005-04-03 10:31 Thien-Thi Nguyen
2005-04-07  6:55 ` Juri Linkov
2005-04-08  3:22   ` Richard Stallman
2005-04-08  6:31     ` Marcelo Toledo
2005-04-08  7:27       ` Kenichi Handa
2005-04-08 18:32       ` Juri Linkov
2005-04-08 18:43         ` Marcelo Toledo
2005-04-10  1:54         ` Richard Stallman
2005-04-08 10:44     ` Eli Zaretskii
2005-04-08 18:32       ` Juri Linkov
2005-04-09  8:00         ` Eli Zaretskii
2005-04-13 23:58           ` David Kastrup
2005-04-14  4:02             ` Eli Zaretskii
2005-04-14  9:46               ` David Kastrup
2005-04-15  8:15                 ` Eli Zaretskii
2005-04-14 19:03             ` Richard Stallman
2005-04-14 23:40               ` David Kastrup
2005-04-17  1:49                 ` Richard Stallman
2005-04-17  9:31                   ` David Kastrup
2005-04-17 19:20                     ` Richard Stallman
2005-04-17 19:51                       ` David Kastrup
2005-04-10  1:54         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200503251251.VAA19321@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.org \
    --cc=rms@gnu.org \
    --cc=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.