2010-03-29 73 views
0

我有一個代碼文件,我將其稱爲「myConstants.res.asp」與一羣在英語和法語常數...爲什麼包含保存爲UTF8 + BOM的unicode字符串常量的代碼文件顯示正確,但保存爲UTF8時,它們不在經典ASP中?

<% 
    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 ... 
%> 

此常數文件包含在其它ASP代碼文件具有以下結構...

<%@ Language="VBSCRIPT" EnableSessionState=False %> 
<% 
    Option Explicit 
    Response.CharSet = "UTF-8" 
    Response.CodePage = 65001  
%> 

<!-- #include file = "myConstants.res.asp" --> 

... additional code ... 

如果我保存爲UTF8 + BOM的Unicode字符正確顯示這在我的例子中的情況是隻爲恆myStr1的問題myConstants.res.asp文件。實際上我有幾百個這樣的字符串。如果我將myConstants.res.asp文件保存爲UTF8(無BOM)。 Unicode字符顯示爲垃圾。

有關爲什麼會發生這種情況的任何想法?

回答

1

可能文件做的包括編碼不同嗎?

相關問題