1回顶部 在做跟手机短信相关的东东时候常遇到各种编码格式数据的转换,特写了几个函数,供参考。 function EncodeEnglish(var s:string):string; Result:=Result+t;
2回顶部 UniHexstr,GB2312:string; begin iLen:=Length(ABinaryString); for i:= APosStart-1 to APosEnd-1 do begin AsciiInt:=ord(ABinaryString[i]); TmpHexStr:=Format('%x',[AsciiInt]); if length(TmpHexStr)=1 then TmpHexStr:='0'+TmpHexStr; AscHexText:=AscHexText+TmpHexStr; end; //for AscLen:=Length(AscHexText); AscUniLen:=AscLen div 4; for i:=0 to AscUniLen-1 do begin UniHexstr:=Copy(AscHexText,i*4+1,4); // Gb2312 := Gb2312 + UnicodeToGb2312(HexAscii2DecimalInt(uniHexstr)); end; // for result := Gb2312 ; end; function WideStringToUnicode_Ex(s:WideString;ADestStr:PChar;Limit:integer):integer; |
閺€鎯版閹存劕濮�閺屻儳婀呴弨鎯版>>
正在阅读:GSM规范中的部分编码转换GSM规范中的部分编码转换
2004-03-23 14:45
出处:CSDN
责任编辑:linjixiong