HTML and CSS Reference
In-Depth Information
If the character encoding is declared properly, browsers can use the appropriate encoding to render web
documents correctly, including all special characters. Browsers usually have an automatic character encoding
recognition feature as well, which is activated if the character encoding declaration is missing. Based on the setting
and features of the file, the browser might identify the character encoding being used. Users can also select an
encoding scheme manually in most browsers which is not needed if all server and document settings are correct.
As an example, let us assume that we want to publish Christmas greetings in several languages on a web page,
as in Table 2-1 .
Table 2-1. Christmas Greetings in Different Languages
Gëzuar Krishtlindjet e Vitin e Ri
اجمل التهاني بمناسبة الميلاد و حلول السنة الجديدة
(Ajmel altehani bemonasebt almīlad wa helol alseneh aljedīdah)
Честита Коледа! (Čestita Koleda!)
Prettige kerstdagen en een Gelukkig Nieuwjaar!
Merry Christmas and a Happy New Year!
Hyvää joulua ja onnellista uutta vuotta
Joyeux Noël et bonne année
Frohes Fest und guten Rutsch [ins neue Jahr]
नये साल की हार्दिक शुभकामनायें (Naye sāl kī hārdik śubhkāmnaye ṅ)
Kellemes karácsonyi ünnepeket és boldog új évet!
Buon Natale e felice anno nuovo
سال نو میلادی بر تمامی مردم جهان مبارک
(Sale noe miladi bar tamami marodme jahan mobarak!)
С Рождеством Христовым и С наступающим Новым Годом
Sale No Mobarak
Not all character encoding systems can represent such a character variety. Without choosing the right character
encoding system, undesirable characters such as squares (□) or question marks ( ) would appear instead of the
correct form of special characters. 2 Inappropriate character encoding (or incorrect encoding declaration) can cause
additional problems too; for example, users might not be able to search in the text. In web documents that contain
characters beyond the English alphabet and not encoded correctly, there might be legible characters (sharing the
same codepoint in the advanced and the basic character encoding), and meaningless characters throughout the
document. Due to wrong encoding, databases might become inaccessible too.
Not only incorrect or missing encoding information can spoil text readability, but also missing fonts or fonts that
do not support all characters of the language(s) of the site.
2 Special characters in English, but basic characters in another language.
Search WWH ::

Custom Search