I have a code file which I will refer to as "myConstants.res.asp" with a bunch of constants in both English and French...
<%
const myStr1 = "Bienvenue dans ma maison au moment de cette belle journée de repos et de détente"
const myStr2 = "Welcome to my house at this beautiful day of rest and relaxation"
... more constants ...
%>
This constant file is included in other ASP code files that have the following structure...
<%@ Language="VBSCRIPT" EnableSessionState=False %>
<%
Option Explicit
Response.CharSet = "UTF-8"
Response.CodePage = 65001
%>
<!-- #include file = "myConstants.res.asp" -->
... additional code ...
If I save the myConstants.res.asp
file as UTF8+BOM Unicode characters are displayed correctly which in my example case is only an issue for the constant myStr1
. In reality I have several hundred of these strings. If I save the myConstants.res.asp
file as UTF8 (no BOM). The Unicode characters show up as garbage.
Any thoughts as to why this is happening?