<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 25, 2016 at 3:47 PM, Jonas Maebe <span dir="ltr"><<a href="mailto:jonas.maebe@elis.ugent.be" target="_blank">jonas.maebe@elis.ugent.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>On 25/02/16 19:31, silvioprog wrote:<br>
<br>
So, is the FPC StrMove() function compatible with the Delphi one?<br>
<br></span>
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}.</blockquote></div><div><br></div><div>Indeed. But, what I need to do? Because this code below still returning "L: 3 - 97 195 163":</div><div><br></div><div><div>program Project1;</div><div><br></div><div>{$mode objfpc}{$H+}</div><div>{$codepage cp1252} // I don't know where I found all list of supported codepages here ...</div><div><br></div><div>uses</div><div> sysutils;</div><div><br></div><div>var</div><div> a: AnsiString;</div><div> la: Integer;</div><div> pa: PAnsiChar;</div><div> b: Byte;</div><div> bs: TBytes;</div><div>begin</div><div> a := 'aã';</div><div> pa := @a[1];</div><div> la := strlen(pa);</div><div> Write('L: ', la, ' - ');</div><div> SetLength(bs, la);</div><div> StrMove(@bs[0], pa, la);</div><div> for b in bs do</div><div> Write(b, ' ');</div><div> ReadLn;</div><div>end.</div></div><div><br></div>-- <br><div><div dir="ltr"><div>Silvio Clécio</div></div></div>
</div></div>