又用什么把它再转回文字啊
像变成
%CD%F8%D2%B3%CE%C4%D7%D6%D7%AA%CE%AA
这样的
网页制造中什么函数能使文字换为符号
答案:1 悬赏:50 手机版
解决时间 2021-02-10 06:10
- 提问者网友:听门外雪花风
- 2021-02-09 23:53
最佳答案
- 五星知识达人网友:执傲
- 2021-02-10 00:24
添加一个Text1控件:
Function toAscii(sIn As String) As String
On Error Resume Next
Dim i As Long
Dim btmp() As Byte
btmp = StrConv(sIn, vbFromUnicode)
For i = LBound(btmp) To UBound(btmp)
toAscii = toAscii & "%" & Right("00" & Hex(btmp(i)), 2)
Next
End Function
Private Sub Form_Load()
Text1.Text = toAscii("测试") '引号内的测试是你要转换的文字
End Sub
Function toAscii(sIn As String) As String
On Error Resume Next
Dim i As Long
Dim btmp() As Byte
btmp = StrConv(sIn, vbFromUnicode)
For i = LBound(btmp) To UBound(btmp)
toAscii = toAscii & "%" & Right("00" & Hex(btmp(i)), 2)
Next
End Function
Private Sub Form_Load()
Text1.Text = toAscii("测试") '引号内的测试是你要转换的文字
End Sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯