I'm working with classic asp for over a decade and I don't remember to have seen this problem. Here is my code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% Option Explicit %>
<%
Response.Expires = -1
Response.CacheControl = "No-cache"
Response.Charset = "windows-1252"
Response.Buffer = false
Server.ScriptTimeout = 300
%>
hello
world
with
unwanded
characters
And here is what i get in the output:
2a hello world with unwanded characters 0
Some characters are added at the begin and the end, i don't know why but it seems related to the Buffer. If I set Buffer = True it fix the problem, but because the real page will return a lot of data I have to set the buffer to false.
I checked the page encoding, all seems good, the file is saved in a windows-1252 encoding. The IIS configurations are the same as other pages on the site which don't have any problem.
I don't understand where these characters come from but i suppose it must be related to encoding, does someone have any idea ??
Thanks
Response.Flushinstead of turning off buffering wholesale?