[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: adding a new encoding
From: |
Kenichi Handa |
Subject: |
Re: adding a new encoding |
Date: |
Tue, 22 Jun 2004 08:44:41 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Baurjan Ismagulov <address@hidden> writes:
> > > * Emacs uses ISO 2022 internally.
> > Not correct. Emacs uses character codes of each ISO-2022
> > conforming charsets.
> And each character is prepended with a charset code?
Yes, prepended with a charset code of range 0x80..0x9D plus
optional extented charset code of range 0xA0..0xFF, and code
points (0x20..0x7F) are `logior'ed with 0x80. So a
multibyte representation of character is classified into
these:
0x00..0x7F
0x80..0x9D 0xA0..0xFF
0x80..0x9D 0xA0..0xFF 0xA0..0xFF
0x80..0x9D 0xA0..0xFF 0xA0..0xFF 0xA0..0xFF
> How do raw bytes
> look like in Emacs memory for, say, \U+0410\U+00DF\U+0534? Is there an
> easy way to see that (princ somewhere in
> lisp/international/mule-cmds.el)?
Try this:
(string-as-unibyte (string (decode-char 'ucs #x0410)
(decode-char 'ucs #x00DF)
(decode-char 'ucs #x0534)))
M-x list-character-sets also give some information.
But, you'ld better not write a code depending on it.
Unicode-based Emacs (that will come after the release of
current CVS HEAD) uses UTF-8 as a multibyte representation.
---
Ken'ichi HANDA
address@hidden