On Thu, Feb 25, 2016 at 3:47 PM, Jonas Maebe <jonas.ma...@elis.ugent.be> wrote:
> On 25/02/16 19:31, silvioprog wrote: > > So, is the FPC StrMove() function compatible with the Delphi one? > > This has nothing to do with StrMove, since clearly the original string is > already different. If you compile your source code in Delphi with > --codepage=65001, it should give the same result as with FPC and {$codepage > utf8}. Indeed. But, what I need to do? Because this code below still returning "L: 3 - 97 195 163": program Project1; {$mode objfpc}{$H+} {$codepage cp1252} // I don't know where I found all list of supported codepages here ... uses sysutils; var a: AnsiString; la: Integer; pa: PAnsiChar; b: Byte; bs: TBytes; begin a := 'aã'; pa := @a[1]; la := strlen(pa); Write('L: ', la, ' - '); SetLength(bs, la); StrMove(@bs[0], pa, la); for b in bs do Write(b, ' '); ReadLn; end. -- Silvio Clécio
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal