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
键盘也能翻页,试试“← →”键