Encoding 特殊字符编码

Encoding 特殊字符编码,encoding,character-encoding,Encoding,Character Encoding,我的项目设置基于CLI生成的Angular,我在显示本地德语字符方面遇到了问题 我的meta在index.html中: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> "[html]": { "editor.detectIndentation": true, "editor.insertSpaces": false, "files.encoding": "utf8", }, "

我的项目设置基于CLI生成的Angular,我在显示本地德语字符方面遇到了问题

我的
meta
index.html
中:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
"[html]": {
  "editor.detectIndentation": true,
  "editor.insertSpaces": false,
  "files.encoding": "utf8",

  },
"[typescript]": {
  "files.encoding": "utf8",
},
"files.encoding": "utf8",
我的文档请求标题:

GET /home?schedule=2 HTTP/1.1
Host: localhost:4200
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: http://localhost:4200/home?schedule=2
Accept-Encoding: gzip, deflate, br
Accept-Language: pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: utilityType=HEAT
和相应的响应头:

HTTP/1.1 200 OK
X-Powered-By: Express
Access-Control-Allow-Origin: *
Accept-Ranges: bytes
Content-Type: text/html; charset=UTF-8
Content-Length: 898
ETag: W/"382-xsHtQLNHNB+FVVszGe2IsoXNXEI"
Date: Fri, 31 Aug 2018 09:05:10 GMT
Connection: keep-alive
我正在使用Google Fonts Open SAN和
拉丁文扩展版
集:

<link href="https://fonts.googleapis.com/css?family=Open+Sans&amp;subset=latin-ext" rel="stylesheet">

任何输出结果仍如下所示:


我想不出还有什么会影响这一点了?

好的,正如@n.m.已经提到的,问题是本地化文件是由外部翻译团队生成的,他们将所有文本提要保存为ANSI,而不是UTF-8编码。将文件从ANSI转换为UTF解决了问题。

首先,您需要查看响应的字节,而不是呈现的输出。保存到文件,并在可以显示实际字节的编辑器中打开。这将使您将问题缩小到客户端或服务器端。