|
After digging around a bit, my sources tell me that since KeySyms are
32 bit values they've been laid out so you can figure out the
charset number. According to Page 506 in the purple "X Window System"
book, byte 3 of the keysym indicates charset.
The CSText widget has a function which maps this charset code into
DECwindows type charset identifiers.
How this is switched I'm still trying to get an answer for.
Mike Collins
|
| >After digging around a bit, my sources tell me that since KeySyms are
>32 bit values they've been laid out so you can figure out the
>charset number. According to Page 506 in the purple "X Window System"
>book, byte 3 of the keysym indicates charset.
This is misleading. A keysym is a unique identifier of a glyph. Characters
in character sets are not unique. Thus the glyph A has only one keysym,
which indicates that it comes from Latin-1. However the character A appears in
many character sets,including all 9 parts of ISO 8859 and also in ideographic
sets such as JIS 208 (Kanji).
The keysyms were laid out by appending several charcater sets and eliminating
duplicates in later sets. This gives an easy mapping from keysym to character
for many of the keysyms. However it was never intended that the bottom byte
of a keysym is defined as the character.
CSText was developed by DEC Israel. Since they are dealing with the Hebrew and
Latin characters, which have no intersection this trick works. However it is
not robust and should be changed to have the language indicated some other
way.
Tim
|