emacs-bidi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-bidi] bidi tables for unicode chars


From: Alex Schroeder
Subject: [emacs-bidi] bidi tables for unicode chars
Date: Fri, 09 Nov 2001 19:01:33 +0100

I have a table like the following for all Unicode characters.

'((?\x0000 . bidi-category-bn)
(?\x0001 . bidi-category-bn)
(?\x0002 . bidi-category-bn)
(?\x0003 . bidi-category-bn)
(?\x0004 . bidi-category-bn)
(?\x0005 . bidi-category-bn)
...

This is the result of parsing the UnicodeData.txt file from the
Unicode site.  The car of his table is a unicode character.  What I
want to do is this:

(mapcar (lambda (entry)
           (let ((char (car entry))
                 (cat  (cdr entry)))
             (modify-category-entry char cat table t))))

Obviously CHAR is not good enough; I somehow need to get the correct
char in the unicode charsets.

Perhaps it is something along the following lines, but I have no
clue.  Any ideas?

(cond ((and (char >= ?\x0100)
            (char <= ?\x24ff))
       (make-char 'mule-unicode-0100-24ff (- char ?\x0100)))
      ((and (char >= ?\x2500)
            (char <= ?\x33ff))
       (make-char 'mule-unicode-2500-33ff (- char ?\x2500)))
      ((and (char >= ?\xe000)
            (char <= ?\xffff))
       (make-char 'mule-unicode-e000-ffff (- char ?\xe000)))
      ((char <= ?\x0100)
       (make-char 'latin-iso8859-1 char)))

If have such a thing, then I can assign the correct bidi categories to
all Unicode characters.

Once I have this, I would like to set the correct bidi category for
all characters in the other charsets as well.  So I need a way to
convert this Unicode character from my table into the correct mule
character.  Any ideas?

Alex.
-- 
http://www.emacswiki.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]