--- On Tue, 13/12/11, Werner LEMBERG <w...@gnu.org> wrote:

> However, for files in emacs-mule encoding, even emacs 23
> correctly
> selects the fonts.  In other words, if I load
> CJKbabel.tex , the file
> looks just fine (at least for me on my GNU/Linux box), and
> the
> `charset' property for each character gives the used
> charset.
> However, if I save the file in UTF-8 encoding (removing the
> `coding'
> tag at the end of the file before doing that), a reloading
> of the file
> no longer selects the right fonts.  For example,
> Japanese CJK
> characters are represented with the SimSun font on my
> computer.

I am wondering how much of this behavior depends on display (and the 
availability of a display with fontsets, etc).

> For emacs-mule encoding, I don't see a different
> behaviour.
> 

> 
> Since this is definitely the way to go (this is, handling
> the legacy
> emacs-mule encoding within emacs 23) I'll ask on the
> emacs-devel
> mailing list if I find some time, which is currently not
> the case,
> unfortunately.  But maybe you are faster than me :-)

> cjk-enc works with all encodings which are charsets at the
> same time,
> including tis620.  However, for Unicode, this is not
> the case: Within
> emacs, this is a virtual encoding, and emacs use a large
> number of
> different charsets to represent it, if necessary.

I have moved on a bit since the last time I wrote. I have switched over to use 
get-text-property. That seems to be better and more consistent than 
char-charset. char-charset in emacs 23 can return different things based on 
priority - that's frustrating - I wonder if there is a "compatibility mode". At 
the moment the difficulties are two folds:

The string returned by get-test-property is not exactly the same as 
char-charset - e.g. 'tis620-2533' vs 'thai-tis620', and 'nil' for ascii region 
instead of 'ascii'. The other thing is, there seems to be some buffer confusion 
and once in a while things switch to a different buffer, and/or the buffer 
pointer got winded back.

Perhaps I could ask: how often does the code backtrack in the input buffer 
scan? It certain does in the Thai part. It is easier to deal with skipping over 
a chunk of input than it backtracking over and over :-(.



_______________________________________________
Cjk maillist  -  Cjk@ffii.org
https://lists.ffii.org/mailman/listinfo/cjk

Reply via email to