如何以简单的方式正确显示 html 标题和正文中的希伯来语文本

问题描述 投票:0回答:1

如何以简单的方式正确显示 html 标题和正文中的希伯来语文本

当我在 VSCode 实时视图选项中打开它时,它在网页标题和正文中显示符号而不是希伯来字符。

我应该怎样做才能正确看到希伯来语文本?

the web page capture here

index.html 文件包含:

<!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>

我期待在标题中看到

שלום

在身体里

שלום עולם!

chrome浏览器响应内容:

响应头不包含任何Content-Type。 Content-Type 是如何定义的?

html title hebrew liveserver
1个回答
0
投票

这个解决方案对我有用

更改 Visual Studio 代码中文件的编码

© www.soinside.com 2019 - 2024. All rights reserved.