asp request utf-8转码函数

asp request utf-8转码函数

Function utf2gb(Body)
 Dim Objstream
 Set Objstream = Server.CreateObject("adodb.stream")
 objstream.Charset = "gb2312"
 objstream.Type = 2
 objstream.Mode =3
 objstream.Open
 objstream.WriteText body
 objstream.Position = 0
 objstream.Charset = "utf-8"
 objstream.Type = 2
 utf2gb = objstream.ReadText
 objstream.Close
 set objstream = nothing
End Function

 

posted @ 2020-03-11 14:51  landv  阅读(499)  评论(0编辑  收藏  举报