![如何知道 Firefox 中的当前编码?](https://linux22.com/image/1482849/%E5%A6%82%E4%BD%95%E7%9F%A5%E9%81%93%20Firefox%20%E4%B8%AD%E7%9A%84%E5%BD%93%E5%89%8D%E7%BC%96%E7%A0%81%EF%BC%9F.png)
我曾经在网站上使用过一些本地字符编码问题,但一秒钟后它就将其切换为正常编码,但我无法检测编码的位置/来源。是否可以在 Firefox/或 Chrome 中至少查看当前编码?
答案1
右键单击页面 -> 显示页面信息(此例中为 UTF-8)
或者更详细地讲,如果你愿意的话,可以使用 Curl 从命令行进行操作:
Linux、Mac、BSD
curl -s -D - http://superuser.com/questions/1035382/how-to-know-current-encoding-in-firefox/1035397#1035397 -o /dev/null
视窗
curl -s -D - http://superuser.com/questions/1035382/how-to-know-current-encoding-in-firefox/1035397#1035397 -o nul
HTTP/1.1 200 OK
Date: Thu, 04 Feb 2016 01:38:01 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=df9847c333782c1258978f0ef728911591454549881; expires=Fri, 03-Feb-17 01:38:01 GMT; path=/; domain=.superuser.com; HttpOnly
Cache-Control: public, no-cache="Set-Cookie", max-age=60
Expires: Thu, 04 Feb 2016 01:39:01 GMT
Last-Modified: Thu, 04 Feb 2016 01:38:01 GMT
Vary: *
X-Frame-Options: SAMEORIGIN
X-Request-Guid: fa91961b-e43e-268b-afcb-9650f78b7efb
Set-Cookie: prov=63457e67-0f52-42c2-817d-4c4def77515e; domain=.superuser.com; expires=Fri, 01-Jan-2055 00:00:00 GMT; path=/; HttpOnly
Server: cloudflare-nginx
CF-RAY: 26f2a75766132d2f-TXL