[fpc-pascal] Problem with StrMove() in a unit compilable in FPC and Delphi

silvioprog silvioprog at gmail.com
Fri Feb 26 04:15:22 CET 2016


On Thu, Feb 25, 2016 at 9:11 PM, silvioprog <silvioprog at gmail.com> wrote:

> Well, the problem persists, and I can't understand why this attached
> project works only if compiled with Delphi. The results:
>
> Delphi:
>
> Length: 3
> aañ
>
> FPC:
>
> Length: 5
> aA£A±
>
> Lazarus 1.6 r51630 FPC 3.0.0 i386-win32-win32/win64
>

Just sharing my whole problem, I'm trying to use a ANSI C library with FPC
on Windows, but I don't know why it doesn't work. The small demo showing
the problem can be found here (both Pascal and C sources):

https://www.dropbox.com/s/ilpti4arhylly24/ansi_test_c_lib.zip?dl=1

(I use a third party library, the "ansi_test.c" is just to reproduce the
problem)

It just concat the 'â' and 'é' characters, but it works only on Delphi,
that prints "2 \n âé" in the console. With FPC it prints "4 \n A¢Ac". :-/

-- 
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160226/244f1aad/attachment.html>


More information about the fpc-pascal mailing list