ASP写入utf-8编码文件

Sub FSOSaveFile(Content,FileName)
dim stm:set stm=server.CreateObject("adodb.stream")
stm.Type=2 '以文本模式读取
stm.mode=3
stm.charset="utf-8"
stm.open
stm.Writetext (content)
stm.Position = 3
dim newStream:Set newStream = Server.CreateObject("adodb.stream")
With newStream
.Mode = 3
.Type = 1
.Open()
End With
stm.CopyTo(newStream)
newStream.SaveToFile server.MapPath(FileName),2
stm.flush
stm.Close
Set stm = Nothing
Set newStream = Nothing
End Sub

原文地址:https://www.cnblogs.com/keringing/p/6064243.html