0

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

Mark Tolonen
  • 166,664
  • 26
  • 169
  • 251
  • 2
    Possible duplicate of [can't show chinese character for html on linux server](http://stackoverflow.com/questions/9713564/cant-show-chinese-character-for-html-on-linux-server) – deceze Nov 09 '16 at 08:40
  • http://stackoverflow.com/questions/279170/utf-8-all-the-way-through – deceze Nov 09 '16 at 08:40
  • [Handling Unicode Front To Back In A Web App](http://kunststube.net/frontback/) – deceze Nov 09 '16 at 08:41

1 Answers1

1

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>
Mark Tolonen
  • 166,664
  • 26
  • 169
  • 251