有这样一个addlist.js文件:
mkList('http://music.cuiz.net/music/aiyuanzhuo.wma','刘嘉亮--爱远走','','');
mkList('http://music.cuiz.net/music/songurl.asp?id=395','王强 - 秋天不回来 (CuiZ.Net)','','');
mkList('http://music.cuiz.net/music/songurl.asp?id=393','Twins - 眼看心勿动 (CuiZ.Net)','','');
mkList('http://music.cuiz.net/music/songurl.asp?id=392','刀郎 - 西海情歌 (CuiZ.Net)','','');
mkList('http://music.cuiz.net/music/songurl.asp?id=391','蔡依林 - 唯舞独尊 (CuiZ.Net)','','');
mkList('http://music.cuiz.net/music/songurl.asp?id=390','郑源 - 我不后悔 (CuiZ.Net)','','');
mkList('http://music.cuiz.net/music/songurl.asp?id=389','S.H.E - 触电 (CuiZ.Net)','','');
mkList('http://music.cuiz.net/music/songurl.asp?id=388','许飞 - 那年夏天 (CuiZ.Net)','','');
mkList('http://music.cuiz.net/music/songurl.asp?id=383','江美琪+光良 - 对你有感觉 (CuiZ.Net)','','');
通过如下代码读取:
function showMusic(){
var arrMus = new Array();
var m_music="",i=0,j;
var musicfile=server.mappath("music/addlist.js");
var fso=Server.CreateObject("Scripting.FileSystemObject");
var openfile=fso.opentextfile(musicfile,1);
while(!openfile.AtEndOfStream){
arrMus[i] = new Array();
var tmpp=openfile.readline();
for(j=0;j<4;j++)
arrMus[i][j]=func.trim(tmpp.split("'")[(j+1)*2-1]);
i++;
}
delete openfile;
delete fso;
}
读出来的中文是乱码,如图:
图片如下:
请问应该怎样解决这个乱码问题?