Difference Between ANSI and Unicode
ANSI vs Unicode
ANSI and Unicode are two character encodings that were, at one point or another, in widespread use. Usage is also the main difference between the two as ANSI is very old and is used by operating systems like Windows 95/98 and older, while Unicode is a newer encoding that is used by all of the current operating systems today. ANSI had many limitations that were not readily apparent during the early stages of its use but became painfully clear once computing started to spread globally.
The main drawback of ANSI is the use of many code pages, depending on the language that is being used; there’s one for English (known as West European Latin), Greek, Turkish, Hebrew, Arabic, and many others. There is no problem when all the computers who access the data use the same code page, but when different code pages are in use, the data read would not be the same as the data written. This could result in data corruption and even program crashes in certain scenarios.
The reason why ANSI cannot accommodate is it uses only 8 bits to represent every code point. This width is fixed and only has a total of 256 different combinations. In comparison, Unicode uses a maximum of 32 bits for each code point; used in fixed width in UTF-32. But because using four bytes for each character is such a huge waste of space, variable width encoding is employed in UTF-8 and UTF-16 to save space.
Because Unicode is a newer standard, it is expected that older operating systems may not support it. Even though the code points of UTF-8 and ANSI are pretty much identical, older operating systems like Windows 95 cannot work with it. Therefore, programs that use Unicode would not be able to run properly on these operating systems. With respect to the opposite, or running ANSI coded programs on newer operating systems, it is possible as there are mechanisms to convert between ANSI and Unicode. Just keep in mind that the conversion adds a bit of processing overhead. It may not be significant given today’s computers, but it is still worth taking note of to improve program efficiency.
Summary:
1. ANSI is a very old character encoding and Unicode is the current standard in use today
2. ANSI uses different pages for different languages while Unicode doesn’t
3. ANSI uses fixed width encoding while Unicode can use both fixed and variable width
4. Unicode programs won’t work on older systems
5. ANSI programs are slower than Unicode programs on current computers
- Difference Between Sony Cybershot S Series and W Series - December 22, 2012
- Difference Between Samsung Galaxy S3 and iPhone 5 - December 21, 2012
- Difference Between Samsung Galaxy S2 (Galaxy S II) and Galaxy S 4G - December 20, 2012
Search DifferenceBetween.net :
Email This Post : If you like this article or our site. Please spread the word. Share it with your friends/family.
Nice article, but you have a typo in the word “note” in the last paragraph:
“but it is still worth taking not of to improve program efficiency.”