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.


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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s