if Len(city)>0 then
x = gb2utf8(city)
if x<>"" then
city = x
end if
end if
Function gb2utf8(s)
Dim byt
Set byt = CreateObject("ADODB.Stream")
byt.Type = 2
byt.CharSet = "GB2312"
byt.Open
byt.WriteText s
byt.Position = 0
byt.CharSet = "UTF-8"
gb2utf8 = byt.ReadText
byt.Close
Set byt = Nothing
End Function
asp utf8到gb2312
最新推荐文章于 2023-03-16 16:17:43 发布
本文介绍了一种使用VBA在GB2312编码与UTF-8编码间进行转换的方法。通过创建ADODB.Stream对象并设置不同的字符集,实现了字符串编码格式的转换。
4131

被折叠的 条评论
为什么被折叠?



