0

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

21 Comments

my problem is this: can you open renklitablo.com ? When you view the source of the frontpage, for example you'll see this '<a href="/Hesabim/KayitOl">&#220;ye Ol</a>'. But I want that to be '<a href="/Hesabim/KayitOl">Üye Ol</a>'
And I checked, they are saved in UTF-8. checked it with notepad
The problem isn't with the html files I think. If I manually write 'Ü' inside my .cshtml file, it is displayed correctly. When the html response is returned from the server, that's when the chars are incorrectly encoded.
@Halo what do you mean? The physical encoding is always the same. Do you see "Ü"?
no, physical encoding is alright. For example, I use UrlHelper.Action and the link that it produces is seen as '/Tablo/Listele?temaId=9&amp;page=0' in the source. Instead it should be '/Tablo/Listele?temaId=9&page=0'. I'm worried Googlebot cannot access my links because of that
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.