How to display Hebrew text in html title and in body correctly in a simple way

117 Views Asked by At

How to display Hebrew text in html title and in body correctly in a simple way

When I open it in VSCode Live View option it shows symbols instead Hebrew characters in a title and in body of web page.

what should I do to see Hebrew text correctly?

the web page capture here

The index.html file contains:

<!doctype html>
<html lang="he" dir="rtl">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>שלום</title>
  </head>
  <body lang="he" dir="rtl">
    <h1>שלום עולם!</h1>  
  </body>
</html>

I was expecting to see in title

שלום

and in body

שלום עולם!

The response content in chrome browser:

the response content in chrome browser capture

Response header doesn't contain any Content-Type. How Content-Type can be defined? Response Headers

1

There are 1 best solutions below

2
Irina On

Update File encoding in VSCode editor

this solution worked for me "change-the-encoding-of-a-file-in-visual-studio-code"