Ar an dara lá is fiche de mí Iúil, scríobh Stephen J. Turnbull:
Aidan Kehoe writes:
> Provide make-8-bit-coding-system, a way to construct a fixed-width
> XEmacs CCL coding system given a map from 8-bit characters to
> Unicode. Such generated CCL coding systems do not have the Latin
> deunification problem of iso-8859-15, for example.
I don't understand. ISO-8859-15 by itself has no "Latin deunification
problem."
And if ISO 8859-15 were ever used by itself, that would be relevant. Hah!
Trying to mix ISO-8859-15 with ISO-8859-1 is what causes the problem,
and
presumably mixing ISO-8859-5 with a "generated CCL coding system" will
give the same problem.
Not these. Conceptually, to encode a character, these coding systems convert
the character to Unicode, and then do a hash lookup of the UCS code ->
octets on disk table. So:
(encode-coding-string (make-char 'japanese-jisx0208 39 107) 'koi8-r)
does the right thing.
(These coding systems are much faster than that implies. For most cases,
most of the time, there’s two to three integer comparisons for each
character encoded, and no hash table lookup.)
I can see that 8-bit coding systems that somehow map to Unicode will
be more compatible with each other, and that's an improvement. But
please document the corner cases more carefully than this.
> Move to accepting characters as well as integers
What do you mean by "as well as"? If something is semantically a
character, only characters should be accepted, and vice versa for
semantic integers.
Agreed. None of the extant CCL code makes this distinction, though, which we
used to get around by doing a char-to-int before writing CCL programs to
disk. That fails for characters that do not have a fixed integer mapping
from one invocation to the next, the just-in-time Unicode ones, chiefly.
If you just mean you're making this distinction properly, hurray!
But we
should avoid polymorphism in these functions if at all possible.
It’s not possible.
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches