Github 页面更改内容字符集 - utf 8 和 windows1256 阿拉伯语
Github Pages change content char set - utf8 and windows1256 Arabic
我有一个 html
页面,this address
上面的html
文件的charset
是arabic
,(如果你去view > text encoding > arabic(windows)
可以看到正确的页面)
但默认情况下,github 服务器发送 utf-8
字符集:
$ curl -I https://marsii.github.io/T3st/1.html
HTTP/1.1 200 OK
Server: GitHub.com
Content-Type: text/html; charset=utf-8
Last-Modified: Sat, 17 Dec 2016 03:55:24 GMT
而且我无法用 html 代码更改这个 charset
,我测试了这个参数:
<meta http-equiv="content-type" content="text/html; charset=windows-1256">
但是我的页面显示不正确并且字符集(在 view > textencoding
中)是 utf-8
并且没有更改为阿拉伯语。
如何使用阿拉伯字符集正确显示我的页面?
GitHub 页数 expects pages to have been stored in UTF-8
所以 if you can encode your files in UTF-8 并将它们推回你的 GitHub 存储库,GitHub 页面将正确地为它们提供服务。
请注意最近有一些 GitHub 页面更改
(markdown support, without Jekyyl; if you want; relative links; theme switcher)
因此,某些错误可能会持续存在。
但是使用 utf-8 文件应该是一个足够好的解决方法,并且将支持任何 code point.
我有一个 html
页面,this address
上面的html
文件的charset
是arabic
,(如果你去view > text encoding > arabic(windows)
可以看到正确的页面)
但默认情况下,github 服务器发送 utf-8
字符集:
$ curl -I https://marsii.github.io/T3st/1.html
HTTP/1.1 200 OK
Server: GitHub.com
Content-Type: text/html; charset=utf-8
Last-Modified: Sat, 17 Dec 2016 03:55:24 GMT
而且我无法用 html 代码更改这个 charset
,我测试了这个参数:
<meta http-equiv="content-type" content="text/html; charset=windows-1256">
但是我的页面显示不正确并且字符集(在 view > textencoding
中)是 utf-8
并且没有更改为阿拉伯语。
如何使用阿拉伯字符集正确显示我的页面?
GitHub 页数 expects pages to have been stored in UTF-8
所以 if you can encode your files in UTF-8 并将它们推回你的 GitHub 存储库,GitHub 页面将正确地为它们提供服务。
请注意最近有一些 GitHub 页面更改
(markdown support, without Jekyyl;
因此,某些错误可能会持续存在。
但是使用 utf-8 文件应该是一个足够好的解决方法,并且将支持任何 code point.