From: rnelson@wsuaix.csc.wsu.edu (roger nelson;S23487) Subject: Re: 8 bit clean implies what? Date: 9 Feb 1993 07:59:20 GMT
>>This is an excellent point that I have not thought of. The natural solution
>>is through the use of a lookup table. But, in general, this requires TWO
>>tables: uppercase and lowercase. However, a single CHANGE_CASE table is
>>sufficient if it is guaranteed that lower_case(x) >= upper_case(x). Does
>>anyone know if this assumption is valid?
One will notice that (with the exception of codes 32-63) the lower order
nyble of the ASCII code for the uppercase character is the same as the
respective lowercase character (and also the respective control character).
The most significant bit of the upper order nyble is an encoding of the
shift keys used:
codes 0000 - 0001 Denote a ctrl character Ie Ctrl-A = 0000 0001
codes 0010 - 0011 don't follow the general encoding scheme
^
codes 0100 - 0101 Denote a shifted char. Ie A = 0100 0001
^
codes 1000 - 1111 Denote an unshifted char Ie a = 0110 0001
^
(Note that there are a few exceptions to the shift key encoding:
64,94,95,96,126 and 127.)
>Yes, this is true for at least ISO-Latin-1 and DEC Multinational
>Character Set (almost identical). The high order part of these char
>sets are pretty much an image of the low order part except the 8th bit
>is 1.
Is the shift key encoding of the characters in the 8-bit character set
preserved?
Roger