当前位置: 代码迷 >> ASP >> 怎样写成utf-8码?解决思路
  详细解决方案

怎样写成utf-8码?解决思路

热度:60   发布时间:2012-05-27 05:42:30.0
怎样写成utf-8码?
123.asp是一个utf-8的文件,用下列代码代替动态包含<!--#include file="123.asp" -->语句时出现乱码(写入的代码变成gb2312的了)。怎样写成utf-8码:
VBScript code

<%
Function getFileContents(strIncludeFile) '函数:读取包含文件内容
Dim objFSO,objText
Set objFSO = Server.CreateObject("Scripting.FileSystemObject") '调用FSO对象
Set objText = objFSO.OpenTextFile(Server.MapPath(strIncludeFile))
getFileContents = objText.ReadAll
objText.Close
Set objText = Nothing
'这里要不要增加objFSO.Close?
Set objFSO = Nothing
End Function

response.write getFileContents("123.asp")
%>



------解决方案--------------------
直接用 Server.Execute "123.asp" 乱码吗?
  相关解决方案