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: Thu, 8 Nov 2001 19:47:02 +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)

Eli Zaretskii <address@hidden> writes:
> On Wed, 7 Nov 2001, Richard Stallman wrote:

>>        The biggest part of coding system is a
>>      mapping table, and without mapping table, we can't have a
>>      complete char-coding-system-table.
>>  
>>  I am suggesting that we should be able to recognize the use of these
>>  coding systems *without* having the whole mapping table.

> find-coding-system-region looks, for each character in the region, inside 
> char-coding-system-table.  That table lists, for every character, the 
> coding systems that can encode that character.  AFAIU, Handa-san was 
> referring to this table as ``the mapping table''.

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.

For instance, in codepage.el, we have many "mapping table"s.

Example:

(defvar cp850-decode-table
  ;; Nth element is the code of a cp850 glyph for the multibyte
  ;; character created by (make-char 'latin-iso8859-1 (+ N 160)).
  ;; The element nil means there's no corresponding cp850 glyph.
  [
   255 173 189 156 207 190 221 245 249 184 166 174 170 240 169 nil
   248 241 253 252 239 230 244 250 247 251 167 175 172 171 243 168
   183 181 182 199 142 143 146 128 212 144 210 211 222 214 215 216
   209 165 227 224 226 229 153 158 157 235 233 234 154 237 231 225
   133 160 131 198 132 134 145 135 138 130 136 137 141 161 140 139
   208 164 149 162 147 228 148 246 155 151 163 150 129 236 232 152]
  "Table for converting ISO-8859-1 characters into codepage 850 glyphs.")

So, once codepage.el is loaded, we have sufficient
information to reflect all cpXXXX in
char-coding-system-table.  But, that inevitably makes
char-coding-system-table bigger, and make
find-coding-system-region a little bit slower.

Those extra space and small slowerness will be ok if we
consider only the current cpXXXX because they are all
one-byte charsets, thus the size is relatively small.

---
Ken'ichi HANDA
address@hidden




reply via email to

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