Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set IIS website's default encoding?

My website is a combination of classic ASP and ASP.NET

My pages' default encoding is currently ISO-8859-1.

Even if there's no <meta> tag, the response page will be encoded ISO-8859-1.

How to change it to UTF-8?

like image 298
Scott 混合理论 Avatar asked Mar 20 '12 03:03

Scott 混合理论


1 Answers

The content encoding is set in the Machine.config file when the .NET Framework is installed. You can edit this file which will affect the response encoding of all ASP.NET sites, or you can override it on a per-site basis using the <globalization> element in each site's Web.config file.

MSDN Link

like image 171
PraveenVenu Avatar answered Sep 23 '22 21:09

PraveenVenu