IIS Server displaying Smart Quotes correctly

IIS server issue, encoding HTML.
I have a web site with HTML files produced by Dreamweaver. It works fine and displays correctly as a simple anonymous access website. We are adding Forms Authentication, and to make the HTML files utilize the authentication technique, we have added an entry in Application Extensions to have the HTML files processed by c:\winnt\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll. After making this change our web site does not display correctly. Specifically some of the smart quote characters, like opening and closing quotes display as gibberish characters - “
We are led to believe it is an encoding issue, so we added <?xml version="1.0" encoding="utf-8"?> to the top of our HTML files – no change.

So, does anyone know a solution to this issue on the server side?
The Dreamweaver files are using some special encoding of these characters. Is there perhaps a setting in Dreamweaver to get it to use the HTML codes like &#8220 or &ldquo; when saving the file?
Thanks,
Bart
bartteemsAsked:
Who is Participating?
 
bartteemsAuthor Commented:
Changed the local file encoding in the web config file from Windows-1252 to UTF-8. Fixed it
0
 
bartteemsAuthor Commented:
One more thing, is a Windows 2003 Server, IIS 6
0
 
meverestCommented:
Hi,

when you look at the output html (i.e. view->source in browser), what do those troublesome characters look like?

Cheers.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
bartteemsAuthor Commented:

Here is screen shot of Displays - the good and the bad

here is Source view of bad
        <li>Identify “What’s in it for me” and “What’s against my interests” for different segments / stakeholders</li>
              <li>Take time to understand what works / doesn’t work in this organization and why</li>

here is source view of Good.
     <li>Identify “What’s in it for me” and “What’s against my interests” for different segments / stakeholders</li>

Here are the IIS configuration changes
 
1.) configure .htm, .asp. etc. etc. extensions to use the same filter as a standard .aspx page:  
            a.) right click on your virtual directory --> properties  
            b.) find the virtual directories tab for IIS 5.0 or the Home directories tab for IIS 6.0 and click "Configuration"  
            c.) find the .aspx extension, double click, and copy the path to aspnet_isapi.dll, the path being found in the executable text area [****** This might be the culprit*******]  
            d.) click "add" under the "application configuration" window and paste the path to aspnet_isapi.dll inf the executable text area  
            f.) type ".htm" (without the quotes) in the extension text area (this can be replace with any file extension eg: asp/html)  
            e.) while still in the "add/edit application extension mapping" window click the "limit to" radio button and type "GET,HEAD,POST,DEBUG"  
            f.) ensure that the "script engine" radio button is selected but not the "verify the file exists" radio button  
2.) add the following to the script.web heading in web.config file for the directory:  
       <httpHandlers>  
        <add verb="GET, HEAD, POST, DEBUG" path="*.htm" type="System.Web.UI.PageHandlerFactory"/>  
        <add verb="GET, HEAD, POST, DEBUG" path="*.html" type="System.Web.UI.PageHandlerFactory"/>  
        <add verb="GET, HEAD, POST, DEBUG" path="*.asp" type="System.Web.UI.PageHandlerFactory"/>  
       </httpHandlers>  
note: add any other extensions that were configuration in the application configuration window  
   
3.) find the "compilation: section of the web.config file and ensure it looks like the following:  
        <compilation debug="false" strict="false" explicit="true">  
            <buildProviders>  
                        <add extension=".htm" type="System.Web.Compilation.PageBuildProvider" />  
            <add extension=".asp" type="System.Web.Compilation.PageBuildProvider" />  
            <add extension=".html" type="System.Web.Compilation.PageBuildProvider" />  
            </buildProviders>  
         </compilation>  

CorrectlyDisplayedData.png
IncorrectlyDisplayed-Characters.png
0
 
meverestCommented:
OK, so the original text is being translated before it gets to the browser.  sure does seem like the .net dll is translating the html incorrectly.

What happens if you change those special characters in your html files to properly escaped characters, eg:  " = &quot;

Cheers.
0
 
bartteemsAuthor Commented:
It works fine if I change the source HTML. to either regular quotes or the html escape of &quot
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.