Nafis Tanveer Islam
Nafis Tanveer Islam

Reputation: 21

Can't display Unicode characters in web browser?

I typed unicode characters in a file named 'test.html' and then saved it. The thing is gedit can display properly , but when I open the html in webbrowsers the characters become like this "† ® ¾ ° ¨ ¾ ® ª ¿ ß ¾ ² " and " মেয়র হলà§" , A bunch of 3/4 , R and gibberish icons.Both chrome and firefox is having trouble , Only gedit is able to display the characters properly . How can I fix this ?

For clarification , here is the original text in gedit:

Original text

And here is how is it viewed in browser:

As displayed in browser

Upvotes: 0

Views: 1605

Answers (1)

Mark Tolonen
Mark Tolonen

Reputation: 177461

Declare the encoding of your HTML file. Make sure to save it in UTF-8. Here's a minimal example:

<meta charset="utf-8">
<h1>उद् उ ज्योतिः अमृतम् विश्वजन्यम्</h1>

Upvotes: 1

Related Questions