Link to home
Start Free TrialLog in
Avatar of Aleks
AleksFlag for United States of America

asked on

Downside of adding characters set in ASP pages

I have a web application that is built on ASP Classic.

The header of each page has:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html>

Open in new window



Sometimes a user will type a strange character, and unless the code below is added to all the pages the character will not be displayed correctly.

<%
Response.ContentType = "text/html"
Response.AddHeader "Content-Type", "text/html;charset=UTF-8"
Response.CodePage = 65001
Response.CharSet = "UTF-8"
%>

Open in new window


Is there any downside of adding that code to each ASP page in the application ?
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Aleks

ASKER

Thank you!  I did create and include file with the code and simply added the line to the pages.  All set!
Avatar of Aleks

ASKER

Thank you!
Ok, so I believe you solved it by yourself in which actually you just want to get a confirmation from experts?

did my comment guide you for solution?
Avatar of Aleks

ASKER

Ugh. I accepted the wrong comment. How do I fix it to assign the points to your reply and not mine? :$