IIS 7 & IIS 8
Last post Jul 04, 2012 11:00 PM by hubertd
May 10, 2012 08:21 AM|LINK
I have a Web Application in Classic ASP which currently is generating this into the response output
meta_global = "<meta http-equiv=""content-type"" content=""text/html; charset=ISO-8859-1"">"
So the Page runs in ISO-8859-1. Everything works fine and as the page is in German, I can use the German "Umlaut" like äöü ÖÄÜ. So the scripts like asdf.asp are containing öäü - sometimes because of forgotten HTML Encoding in hardcoded Text, but sometimes
also because there is not other way, for example in variables with email text or Record Set contet:
MyEmailText = "... bla bla öäü"
Rs("MyField") = " ... ö bla bla"
When I change now the meta Tag to UTF-8:
meta_global = "<meta http-equiv=""content-type"" content=""text/html; charset=UTF-8"">"
Then suddenly the Page gets Problem with the äöü everywhere. They are replaced by ? or just removed - not only at the HTML Ouput, also for example when sending emails in plain Text. But on the ohter side if I render Text unencoded form the
response.write(rs("content") and the field "content" has äöü then they are rendered correctly.
So this is not a problem of the output, it seems that the asdf.asp script is convertet in some way because of the meta tag. This actually makes no sense to me, because the meta tag is no server command and the server should just write it to
the buffer like any other string, but it doesn't.
Does anyone have an idea? The problem appers in IIS 7.5 in Windows 7 as well as on IIS 6.0 in W 2003 Server.
May 10, 2012 08:55 AM|LINK
May 10, 2012 11:20 AM|LINK
I think I solved the problem:
All script Files, also the includes need to be saved as unicode, then the problem disappears.
It is still strange why the ASP changed part of the script just because a meta tag was added to the html. I tought the classic asp doesn't care about the output html.
May 10, 2012 11:54 AM|LINK
May 10, 2012 01:21 PM|LINK
Yes, I thought the same... but how about the email.
If I send an email, the HTML Meta Tag is not added, it does not play any role. But even in the emails the öäü were missing. And they were not in the source code of the email. The email text is stored in normal asp variables, it is processed by asp and send
by the asp module cdosys and has nothing to do with the browser or the response buffer. But it was affected, too. This let me guess that asp changed the whole content of the script file. I can not find any other reason.
Jul 04, 2012 11:00 PM|LINK