W3C home > Mailing lists > Public > www-international@w3.org > January to March 2002

Re: Setting charset in IIS headers

From: L. Turetsky <lenny@aya.yale.edu>
Date: Sat, 23 Mar 2002 10:59:43 -0800
Message-Id: <5.1.0.14.0.20020323105605.054a5830@postoffice.pacbell.net>
To: Dave Ringoen <dringoen@alventive.com>
Cc: "'www-international@w3.org'" <www-international@w3.org>
Hi Dave,

If the only problem is setting the charset header on ASP pages, why not 
simply include a line of code at the top of each page:
     SetContentType("text/html; charset=XXXXX");
?

I'm not sure if that's the exact syntax, but I'm almost certain that 
there's an equivalent to it.
IIS *should* provide a better way along the lines of what you tried, but 
this isn't the place for yet-another-MSFT-rant...

I hope this helps. At the moment I don't have access to an IIS server to 
test it on.

/LT
<!--
available and experienced i18n engineer
http://resumes.dice.com/lturetsky
-->



At 10:51 AM 3/21/02 -0500, Dave Ringoen wrote:
>Referencing this web page: 
><http://www.w3.org/International/O-HTTP-charset.html>http://www.w3.org/International/O-HTTP-charset.html
>
>It describes a procedure for setting a charset for localized pages:
>
>For IIS 4 and 5, in Internet Services Manager, right-click "Default Web 
>Site" (or the site you want to configure) and go to "Properties" => "HTTP 
>Headers" => "File Types..." => "New Type...". Put in the extension you 
>want to map, separately for each extension; IIS users will probably want 
>to map .htm, .html, .asp,... Then, for Content type, add 
>"text/html;charset=iso-8859-1" (without the quotes; substitute your 
>desired charset for iso-8859-1; do not leave any spaces anywhere because 
>IIS ignores all text after spaces).
>
>I am unable to make this work. For an asp, the web server always returns 
>"Content-Type: text/html", even when I define it to be something else. I 
>created a new extension .xyz, and managed to have it set that correctly, 
>but no matter what I do for "asp" it ends up as "text/html". Just curious 
>if any of you can help me make this work.
>
>Thank you,
>Dave Ringoen
>Alventive, Inc.
Received on Saturday, 23 March 2002 22:51:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:16:58 GMT