繁体内码,FSO写入简体内容出错,请大家给看看...
cncat 2005-12-31 01:05:45 操作系统:繁体Windows2000,sp4
IE:6.0
function writeToFile(sContent, sFile){
try{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var textstream = fso.CreateTextFile(sFile, true, false);
textstream.Write(sContent);
textstream.Close();
}catch(E){
alert(E.number + E.description);
}
}
以上代码在sContent不包含简体内容的时候没有问题,否则会出错:-2146828283无效的过程调用或参数。
如果是简体Windows,但是默认内码改成繁体也有同样的问题。
等会写一个错误重现代码贴上来,请了解的朋友多多帮忙!
bow~~