121k views
5 votes
What are the advantages and disadvantages of UTF-8 compared to ASCII?

User Prekolna
by
8.3k points

1 Answer

5 votes

Answer:

UTF-8 and ASCII both are the character encoding.

In a system,every character has some binary representation,these are the method to encode them.Earlier only ASCII was there, for every character it uses 8 bits to represent.In ASCII only 8 bytes were there i.e 2^8 that is 256.We can't represent number beyond than 127 so it generate a need for other encoding to get into,these drawbacks lead to Unicode,UTF-8.

As ASCII codes only uses a single byte,UTF-8 uses upto 6 bytes to represent the characters.So we can save characters which are as long as 2^48 characters. We can read this encoding easily by the help of shift operators and it is also independent of byte order.

As messages on internet were transferred over 7 bit ASCII messages,so many mail servers removed this encoding.

User Sairaj Sawant
by
8.6k points

Related questions

asked Jul 27, 2021 49.1k views
Amelse Etomer asked Jul 27, 2021
by Amelse Etomer
8.4k points
1 answer
1 vote
49.1k views