用javascript将汉字转化成unicode例子
s=new String(loginuser);
newuser="";
for(i=0;i<s.length;i++)
{
newuser=newuser+s.charCodeAt(i)+";";
}
代理中将转化unicode串转化成汉字串的例子
Call UnicodeToString(unicodestr,转化的汉字串)
Sub UnicodeToString(unicodes As String,anystring As String)
If unicodes="" Then
anystring=""
Exit Sub
End If
While Not unicodes=""
tmpcode$=Left$(unicodes,Instr(unicodes,";")-1)
unicodes=Right$(unicodes,Len(unicodes)-Instr(unicodes,";"))
If tmpcode$="65536" Then
anystring=""
Exit Sub
End If
anystring=Trim(anystring)+Uchr$(Cstr(tmpcode$))
Wend
End Sub
s=new String(loginuser);
newuser="";
for(i=0;i<s.length;i++)
{
newuser=newuser+s.charCodeAt(i)+";";
}
代理中将转化unicode串转化成汉字串的例子
Call UnicodeToString(unicodestr,转化的汉字串)
Sub UnicodeToString(unicodes As String,anystring As String)
If unicodes="" Then
anystring=""
Exit Sub
End If
While Not unicodes=""
tmpcode$=Left$(unicodes,Instr(unicodes,";")-1)
unicodes=Right$(unicodes,Len(unicodes)-Instr(unicodes,";"))
If tmpcode$="65536" Then
anystring=""
Exit Sub
End If
anystring=Trim(anystring)+Uchr$(Cstr(tmpcode$))
Wend
End Sub