0

I have index.html that when I load it in the browser, all characters with special encoding (e.g. Hebrew, Arabic) are in Gibberish. But, when I load the same html in notepad++ , I get it in the right display.

The htmls meta tags are:

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">

EDIT:

Example for problematic characters:

אלו האותיות הבעיתיות

Any Advice?

Jonathan
  • 377
  • 5
  • 20

2 Answers2

1

Check if the http server sets the correct http-header Content-Type: text/html; charset=utf-8. You can check the headers with

curl - I http://example.com
Tom Zych
  • 13,329
  • 9
  • 36
  • 53
metakeule
  • 3,724
  • 2
  • 23
  • 29
0

To problem will most likely be that the browser thinks it should use some encoding (UTF-8 in this case, because of the meta tag), while the bytes send to the browser are in a different encoding.

If it's a plain index.html file, so not generated by some application try to save the file with the correct encoding: utf-8.

you can use something like:

file index.html

To see what encoding might be used currently.

But to be sure re-save the file to utf-8 (see notepad++ converting ansi encoded file to utf-8 for tips how to do it)

Community
  • 1
  • 1
Richard Deurwaarder
  • 2,023
  • 1
  • 26
  • 40