LongDirtyAnimAlf / fpcupdeluxe

A GUI based installer for FPC and Lazarus
504 stars 94 forks source link

The linux arm32 compiler does not properly handle utf8-bom encoded inc files #710

Open winddriver opened 1 month ago

winddriver commented 1 month ago

The compilation environment is windows 10 x64, and the execution file of linux arm32 is generated by cross-compilation

Both fpc and lazarus are the latest versions pulled from gitlab

When an inc file is encoded with utf8-bom, including the file with $I will cause garbled characters

This is a demo project. HelloWorld(inc_utf8_bom).zip

This is a screenshot of the run, in which two Chinese characters have become garbled. image

If you use utf8 encoding, there will be no problem. This is a demonstration project using utf8 encoding HelloWorld(inc_utf8).zip

This is a screenshot of the operation. You can see that the Chinese is displayed normally. image

winddriver commented 1 month ago

Add a point, linux arm64 does not have this problem, so I suspect that linux arm32's cross-compile tool chain caused the problem, can you update the cross-compile tool

LongDirtyAnimAlf commented 1 month ago

The problem is the lack of GNU binutils for Android. Recent Android tools are based on clang and llvm. FPC cannot use these newer tools. So we are stuck with the old ones. You might try to find newer GNU tools (binutils) yourselves and point me towards them, in case I have missed them.