中文和英文解决思路
中文和英文
对某一内容进行判断
如何判断内容是中文还是英文?判断编码?
------解决方案--------------------
更正7 楼 of123 的回复:
还有一种方式,是检查串的比特长度:
Dim strSource As strinh
Dim strANSI As String
strSource="中文ABC"
strANSI = StrConv(strSource, vbFromUnicode)
If Len(strSource) = LenB(strANSI) Then
MsgBox strSource+" 里面没有中文字符"
Else
MsgBox strSource+" 里面有中文字符"
End If
对某一内容进行判断
如何判断内容是中文还是英文?判断编码?
------解决方案--------------------
更正7 楼 of123 的回复:
还有一种方式,是检查串的比特长度:
Dim strSource As strinh
Dim strANSI As String
strSource="中文ABC"
strANSI = StrConv(strSource, vbFromUnicode)
If Len(strSource) = LenB(strANSI) Then
MsgBox strSource+" 里面没有中文字符"
Else
MsgBox strSource+" 里面有中文字符"
End If