Delphi7转delphi2010遇到的字符问题
除了pchar转成pansichar外,我自己写的一些算法全部无效了。。。。
以下是Delphi7的部份代码代码:
function B64Encode1(const S: string): string;var i: integer; InBuf: array[0..2] of byte; OutBuf: array[0..3] of Char;begin SetLength(Result, ((Length(S) + 2) div 3) * 4); for i := 1 to ((Length(S) + 2) div 3) do begin if Length(S) < (i * 3) then Move(S[(i - 1) * 3 + 1], InBuf, Length(S) - (i - 1) * 3) else Move(S[(i - 1) * 3 + 1], InBuf, 3);