Welcome to WebmasterWorld Guest from 54.82.99.169

Forum Moderators: ocean10000

Message Too Old, No Replies

Content-Type: text/html; charset=utf-8

Setting this via IIS 5 disables my stylesheets

     
7:39 pm on Aug 16, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 17, 2002
posts:2251
votes: 0


I need to set Content-Type: text/html; charset=utf-8 via HTTP Headers in IIS Manager under IIS 5.

When I do that though my stylesheets get disabled despite setting the content-type for the stylesheets when I link to them:

<link rel="stylesheet" href="/template/css/twitter.css" type="text/css" media="all">

I mainly need to set the charset to utf-8 in hopes of being able to display Japanese symbols from the client's Twitter stream.

Doing it via the meta-tag isn't working and I noticed on Twitter, which does display Japanese just fine, that the response headers are:

Content-Type: text/html; charset=utf-8

Their stylesheets work just fine!

Will someone please offer some advice on what I'm doing wrong? Non-English alphabets are, pardon the pun, foreign to me. ;)

8:34 pm on Aug 16, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
posts:864
votes: 3


Did you add it to Custom http Headers via IIS Management Console? If you did you are changing it site wide for all documents not just asp and html documents.

You need to edit MIME Map Types
Specificly for .asp files to be "text/html; charset=utf-8" by default it is "text/html"

8:49 pm on Aug 16, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 17, 2002
posts:2251
votes: 0


Yes, I was adding to the custom http headers for the site. I tried your suggestion of the MIME type. At least my stylesheets work now. But still no Japanese symbols, and the response headers still show a content-type of text/html, no utf-8. Thanks for all your help this afternoon. You got me further than I was going on my own. I'm starting to think there's a problem with my development server. I'll have to ask my sysadmin about it on Monday. If anyone else has any suggestions please share them. Thanks!
10:27 pm on Aug 16, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 17, 2002
posts:2251
votes: 0


The root of the problem seems to be that when I read from the XML file HTML entities (I think that's the right word) get converted from &#nnnnn; format to the actual character, and thusly I can no longer display them as Japanese symbols.

I'm going to post in the XML Development forum to see if there's a way to prevent this transformation from happening.