emacs-devel
[Top][All Lists]
Advanced

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

Re: Q: something like autoload for coding-systems?


From: Kenichi Handa
Subject: Re: Q: something like autoload for coding-systems?
Date: Mon, 12 Nov 2001 11:47:17 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.1.30 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

Richard Stallman <address@hidden> writes:
>     No, I mean by "mapping table" a more general concept, a
>     table that contains a mapping information between a
>     code-point of some charset and the correponding character
>     code.

> That is what I thought it meant.

> Isn't it possible for find-coding-system-region to work with a much
> smaller amount of information?  For instance, it could use a list of
> intervals (in the mathematical sense), saying that coding system FOO
> handles character codes X through Y and A through B and C through D.
> This would be far less information than the mapping table.

Such a way is not that worth for many cpXXX coding systems.
For instance, see this codepage (in codepage.el).

;; Portuguese
(defvar cp860-decode-table
  [
   255 173 155 156 nil nil 179 nil nil nil 166 174 170 nil nil nil
   nil 241 253 nil nil nil nil 249 nil nil 167 175 172 171 nil 168
   145 134 143 142 nil nil nil 128 146 144 137 nil 152 nil 139 nil
   nil 165 159 169 140 153 nil nil nil 157 150 nil 154 nil nil nil
   133 160 131 132 nil nil nil 135 138 130 136 nil 141 161 nil nil
   nil 164 149 162 147 148 nil 246 nil 151 163 nil 129 nil nil nil]
  "Table for converting ISO-8859-1 characters into codepage 860 glyphs.")

Even if we convert it to a list of intervales, it seems that
the gain in memory is little.

And, even if we adopt that way, such information is useful
only for answering the question "Is this character encodable
by this coding-system?".  To utilize that information in
find-coding-system-region, we must look up such lists for
ALL coding systems for all characters in the region.  I
think it's not practical.

---
Ken'ichi HANDA
address@hidden



reply via email to

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