H hpsmall Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-28 #1 http://***/lbimages/usravatars/%D2%AC%D7%CF.gif 如何把/%D2%AC%D7%CF.gif转换为中文的图片名称?
Z zhukewen Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-28 #2 %D2%AC%D7%CF是用16进制表示的中文字符 function HexToStr(Str: String): String; var i: Integer; begin Result := ''; for i := 1 to Length(str) div 3 do Result := Result + Chr(Strtoint(Copy(Str,i*3-2,2))); end;
%D2%AC%D7%CF是用16进制表示的中文字符 function HexToStr(Str: String): String; var i: Integer; begin Result := ''; for i := 1 to Length(str) div 3 do Result := Result + Chr(Strtoint(Copy(Str,i*3-2,2))); end;
H hpsmall Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-28 #3 不对啊 这句应该是: Result := Result + Chr(Strtoint('#'+Copy(Str,i*3-1,2))); 但是这是16进制,不能直接用strtoint,怎么办?
B beta Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-28 #4 在前面加了 # 就可以用 strtoint 了:) 你给的代码是对的