I need to do a script in classic ASP to generate a CSV file for the user to download. It needs to be encoded in "classic Windows Unicode", ie., UTF-16.
I tried this:
Response.Clear
Response.ContentType = "text/csv"
Response.Charset = "utf-16"
Response.Codepage = 1200
Response.AddHeader "Content-Disposition", "attachment; filename=export.csv"
but I get the error
ERROR -2147467259: 006~ASP 0204~Invalid CodePage Value~An invalid CodePage value was specified.
which makes sense, because according to the documentation, code page 1200 is only available to managed (ASP.NET) applications.
But then, how can I set the Response's charset to UTF-16?