Unicode vs ASCII — What's the Difference?
ASCII is an older character encoding representing only 128 characters, covering basic English letters, digits, and symbols; Unicode is a much larger standard...
Published November 23, 2026
ASCII is a 7-bit character set with 128 characters (English letters, digits, punctuation); Unicode is a universal standard assigning a code point to over 140,000 characters from every writing system plus emoji. ASCII is a subset of Unicode.
The concept
ASCII 'A' is 65, the same in Unicode (U+0041). Unicode defines code points; encodings such as UTF-8 and UTF-16 define how they become bytes.
Treating all text as bytes or assuming 1 character = 1 byte breaks with non-English text.
Code points
A → U+0041 (ASCII 65)
é → U+00E9 (not ASCII)
₹ → U+20B9
😀 → U+1F600
Practical examples
JavaScript
'A'.charCodeAt(0) // 65
'😀'.codePointAt(0) // 128512
'😀'.length // 2 (UTF-16 units)Python
ord('₹') # 8377
'₹'.encode('utf-8') # b'\xe2\x82\xb9'Database
CREATE TABLE t (name VARCHAR(100)) CHARACTER SET utf8mb4;Common mistakes
- Using latin1/utf8 (3-byte) in MySQL and losing emoji.
- Assuming string length equals visible characters.
- Mismatched encodings producing mojibake.
Key takeaways
- ASCII = 128 chars, Unicode = all scripts.
- ASCII is a subset.
- Use UTF-8 everywhere.
FAQ
Is UTF-8 Unicode?
It is an encoding of Unicode.
What is mojibake?
Garbled text from decoding with the wrong encoding.