Issuing an HTML type declaration HTML page

I am creating a webpage that should support all utf-8 languages. Unfortunately, some characters of the language are not recognized in IE, but it is well versed in mozilla and chrome, why?

 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>Chinese Text : &#24744;&#22909;&#19990;&#30028; </p> <p> Indian text : &#2361;&#2375;&#2354;&#2379; &#2357;&#2367;&#2358;&#2381;&#2357; </p> </body> </html> 

but when I delete the first line, the characters are also displayed on internet explorer (IE) .

 Removed : <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 

Can someone please explain what should be the correct doctype declaration for multilingual support.

+4
source share
2 answers

Currently, charset set to ISO-8859-1 , which is a character set for Western European characters. Change it to UTF-8 to have support for all Unicode characters:

 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
+11
source

Check answers to question 3867678 . They seem to say that IE 8 does not have a font for Chinese characters by default (although, I suppose, this applies only to some installations). Installing a font in CSS should help, although I'm not sure what might be the optimal list of font families; maybe something like

 font-family: Arial Unicode MS, PMingLiU, MingLiU, SimSun 
0
source

Source: https://habr.com/ru/post/1388427/


All Articles