码迷,mamicode.com
首页 > Web开发 > 详细

ASP写入utf-8编码文件

时间:2016-11-15 08:25:26      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:ext   utf-8   position   text   mod   pos   filename   object   copy   

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

ASP写入utf-8编码文件

标签:ext   utf-8   position   text   mod   pos   filename   object   copy   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!