Displaying non ascii characters in html
This happens very often. We have some non ascii characters to display on a webpage. Without properly encoding, we see funny latin letters or squares displayed instead.
This is not an “international” issue. Even in the US, when users copy and paste content from a word document, that content often contains non-ascii characters, say the bulletin points. After such content gets inserted in the db, that content often simply gets blindly displayed onto a webpage along with other well-behaved data. So we see the funny characters again.
Assuming the database has the right stuff, the simple solution to fixing this is the following.
1 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset="UTF-8"> |
Just put that in your html head section. You webpage should then be displayed properly.
Ref link: http://www.terena.org/activities/multiling/euroml/tests/html-eurolat1.html
Related posts: