Html Encoding (Character Sets):
A web browser must know character set, To display Html page correctly.Character Encoding?
ASCII was first character set also called character encoding standard.It defines 127 different alphanumeric characters that can be used on internet.ASCII supports numbers (0 to 9),English letters(A to Z) and some special characters like ! $ + -
( ) @ < >.
ANSII (windows-1252) was original windows char-set.It supports 256 Character codes.
ISO-8859-1 was default char-set for html 4.It also supports 256 Char-set codes.
As ANSI and ISO were limited so character encoding was changed to UTF-8 in Html5.
UTF-8 COVERS ALL CHARACTERS AND SYMBOLS IN WORLD.
Html 4 processors are also supports UTF-8.
Html Charset Attribute:
In order to dispaly html page correctly, a web browser must know character set used in page.This is specified in <meta> tag;
For Html 4:
For Html 5:
Difference b/w Char-sets:
Here is difference b/w character set;ASCII Character Set:
ASCII uses values from 0 to 31 for control characters.ASCII uses values from 32 to 126 for letters, digits, and symbols.
ASCII doesnot use values from 128 to 255.
ANSI Character Set (Windows-1252):
ANSI is identical to ASCII for values from 0 to 127.ANSI has proprietarty set of characters for values from 128 to 159.
ANSI is identical to UTF-8 for values from 160 to 255.
ISO-8859-1 Character Set:
8859-1 is identical to ASCII for values from 0 to 127.8859-1 does not use values from 128 to 159.
8859-1 is identical to UTF-8 for values from 160 to 255.
UTF-8 Character Set:
UTF-8 is identical to ASCII for values from 0 to 127.UTF-8 does not use values from 128 to 159.
UTF-8is identical to both 8859-1 and ANSI for values from 160 to 225.
UTF-8 continues from value 256 with more than 10,000 different characters.
No comments:
Post a Comment