Force encoding with IIS 7

Posted by Cédric Boivin on Server Fault See other posts from Server Fault or by Cédric Boivin
Published on 2010-05-26T15:57:31Z Indexed on 2011/11/21 17:54 UTC
Read the original article Hit count: 235

Filed under:
|
|
|

I try to force encoding with IIS 7.

When I add in the http response headers the key :

Content-Type and value charset=utf-8 i got this key content-type : text/html,content-type=utf-8

it's there a way to remove the comma ?

Thanks Justin for your answer.

But it's seen don't work. There is my config, i need to do that for asp classic.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            <remove fileExtension=".html" />
            <remove fileExtension=".hxt" />
            <remove fileExtension=".htm" />
            <remove fileExtension=".asp" />
            <mimeMap fileExtension=".htm" mimeType="text/html" />
            <mimeMap fileExtension=".hxt" mimeType="text/html" />
            <mimeMap fileExtension=".html" mimeType="text/html" />
            <mimeMap fileExtension=".asp" mimeType="text/html; charset=UTF-8" />
        </staticContent>
    </system.webServer>
</configuration>

© Server Fault or respective owner

Related posts about iis

Related posts about iis7