Your code is correct, although I prefer to install CharSet in the code instead of using the meta tag: -
<% Response.CharSet = "UTF-8" %>
Codepage 65001 refers to the UTF-8 character set. You will need to make sure your asp page (and all inclusive) is saved as UTF-8 if they contain any characters outside the standard ASCII character set.
By specifying the CODEPAGE attribute in the <% @ block, you indicate that everything written using Response.Write must be encoded into the specified Codepage, in this case 65001 (utf-8). It should be borne in mind that this does not affect any static content that is sent verbatim for the byte for the response. Therefore, the reason the file is actually saved is using the specified code page.
The CharSet property of the response sets the CharSet value of the Content-Type header. This does not affect how to encode the content that it encodes, it simply tells the client which encoding will be received. Again, it is important that its value matches the actual encoding sent.
AnthonyWJones Oct 27 '09 at 9:01 2009-10-27 09:01
source share