set oStream = server.CreateObject("ADODB.Stream")
  oStream.Type=2
  oStream.Mode=3
  oStream.Open()
  oStream.Charset = "utf-8" 'newcodepage 新的编码
  oStream.WriteText mb_code
  oStream.Position= 0
  oStream.Type= 2
  oStream.Charset="GB2312" 'oldcodepage 旧的编码
  oStream.SaveToFile server.MapPath(filepath),2
  oStream.Close()
  set oStream = nothing 

与原来的文件本身的编码没有关系

好久没有用asp了.今天帮同事看生成静态页时需要utf-8编码,的解决方案.FSO好像没有地方设制编码

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
  • 2021-08-07
  • 2021-07-31
猜你喜欢
  • 2022-02-19
  • 2022-01-08
  • 2022-03-09
  • 2021-07-30
  • 2022-12-23
  • 2021-09-25
  • 2022-01-15
相关资源
相似解决方案