I want my .html files to be encoded in utf-8. I put the meta in the html files and globalization settings in Web.config, but still I observe that my GET requests contain Request headers such as:

Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8

How can I change them to add utf-8 and "tr" language? Is this the reason I see weird characters in the server responses where chars like 'ç' or 'ö' should be in my html files?

有帮助吗?

解决方案

The Accept-Encoding header tells the server what compression algorithms you can handle, for instance, the server might send the response gzipped because you told it that you can handle it.

The character encodings that you can handle are signaled to the server in the Accept-Charset header. For example Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3

Anyway, if you just want your html files to be encoded in UTF-8, all you need to do is to save those files in UTF-8 encoding. This depends on your text editor.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top