answersLogoWhite

0


Best Answer

You compare it against the known character ranges! The following is an example to identify ASCII characters:

  1. First, check if it is ASCII. All ASCII characters are less than 0x80. If it is:
    1. Check for a printable character (range: 0x20 to 0x7E). If it is:
      1. 0x20: Space
      2. 0x30 to 0x39: Numbers
      3. 0x41 to 0x5A: Capital letters
      4. 0x61 to 0x7A: Lowercase letters
      5. Everything else are special symbols ($, #, !, ?, and friends).
    2. Everything else are control characters
  2. If the value is >= 0x80, then it is not ASCII. What character it represents is specified by the codepage.

Note that some codepages (most notably the Windows-1252 codepage, sometimes incorrectly called ANSI) are extensions to the ASCII standard, so the characters less than 0x80 would be the same as in ASCII.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Find out whether an inputted letter is capital letter or small letter or a special symbol?
Write your answer...
Submit
Still have questions?
magnify glass
imp