Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top