Presentation of java character set .
It includes following topics-
Introduction to java fundamentals
Introduction to character set -ASCII & UNICODE
To watch full lecture kindly click on the link below.
https://www.youtube.com/watch?v=2_JkgxXzkMI
5. WHAT IS A CHARACTER SET?
A character set is the set of valid characters that a language
can recognize. It can be a letter, a digit , a symbol or some
control characters such as backspace, tab or newline.
• A-Z(uppercase)
• a-z(lowercase)
• Alphabets from other universal languages
Alphabets
• 0-9Digits
• _ $ etc.
Special
Symbols
• n- for new line
• t for tab spaces
• b for backspace etc.
Escape
Sequences
6. ASCII & UNICODE CHARCTER SETS
We know computer understands only binary codes
i.e. codes of 0’s and 1’s.
So numbers like 65,32,46 etc. can be converted to
binary code. e.g.
65 10(100001)2
7. ASCII AND UNICODE CHARCTER SETS
You might be thinking how can we convert letters like
ABCDEF…. into binary code.
Every single key on the keyboard has number associated
to it
If we press `A` then its decimal ASCII code is 65.Now we
can convert decimal to binary to make it computer
readable and understandable.
65 10(100001)2
ASCII supports 128 characters
ranging from 0-127
ASCII takes 1 byte of memory
space
9. ASCII AND UNICODE CHARCTER SETS
ASCII Codes can represent 128 characters (alphabets(a-
z, A-Z), digits(0-9), symbols, escape sequences)
But we know that java supports alphabets and symbols
from other languages too like Greek , Arabic, Armenian
etc.
To support characters from all the languages UNICODE
Character set is used.
Unicode can support up to 256 character codes ranging
from 0-255.
First 0-127 character codes are same as that of ASCII
codes.
UNICODE takes 2 bytes of memory space.
10. ASCII AND UNICODE CHARCTER SETS
UNICODES
Unicode can support up
to 256 character codes
ranging from
0-255.
First 0-127 character
codes are same as that
of ASCII codes.