Next: Text File Export and
Up: Overall Design
Previous: MacRoman vs. ISO-8859-1
Keyboard Input
One of the layers from the OS to Squeak level code has to create a
character in the extended character set from keyboard input. Because
the Windows or Mac sends a multi-octet character code to the Squeak
VM, one would imagine that modifying VM to pass multi-octet characters
to the Squeak level would be a good solution. However, this is not
desirable in two reasons. One is that making a different VM whose
difference is merely the keyboard input handling is not worthwhile.
The other is that the encoding of the multi octet character sent from
the OS is different from one platform to another. It might even
differ with the setting of the same OS. For Japanese, for instance,
the character sent from the OS could be Shift-JIS on Mac and Windows,
EUC-jp or UTF-8 on Unices with different locale settings, or UTF-16 on
Windows CE. If we do the translation in the VM, we need to write the
C code for each different platform.
In the current implementation of m17n Squeak, we decide not to
modify the VM. If the OS sends a multi octet character to the Squeak
VM, the VM treats the octets as if they are separable characters and
sent them to the Squeak level code through the Sensor object.
The Sensor then interprets the characters if necessary and
generate appropriate character.
Next: Text File Export and
Up: Overall Design
Previous: MacRoman vs. ISO-8859-1
Owner
2003-02-08