LazFileUtils and FileUtil clash lazarus / 31-LCL ---------------------------------------------------------------------- Windsurfer · 2017-02-24 10:17 I have changed a gui app to use LazFileUtils rather than FileUtil, because LazFileUtils provides seamless UTF8. However, the following no longer works unless I add FileUtil to the uses clause. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i MyFilesize := FileSize(OpenDialog1.filename); I get the error: Compile Project, Mode: Normal, Target: WindSirf: Exit code 256, Errors: 1 mainscreen.pas(315,50) Error: Call by var for arg no. 1 has to match exactly: Got "AnsiString" expected "File" Once FileUtil is added to the uses clause (immediately after LazFileUtils), everything works, but many warnings come up stating that FileUtil is deprecated and to use LazFileUtils. Could someone please confirm this behaviour, and I'll raise a bug report to ask for filesize to be added to LazFileUtils. I am using fpc 3.0.2 and laz 1.6 fixes on Linux Mint 18.1 Cinnamon on an Intel 64 bit platform ---------------------------------------------------------------------- balazsszekely · 2017-02-24 10:24 No need for bugreport: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i MyFilesize := FileSizeUtf8(OpenDialog1.filename); ---------------------------------------------------------------------- JuhaManninen · 2017-02-24 11:06 I agree with Windsurfer, this should be solved in a cleaner way. The ...UTF8() functions are not needed for anything else any more. I think it could be solved with overloaded functions in LazFileUtils. The version taking "File" could be a wrapper for the RTL function maybe. Windsurfer, can you please experiment with it and make a patch. ---------------------------------------------------------------------- balazsszekely · 2017-02-24 11:16 @Juha FileSize form FileUtils points to LazFileUtils.FileSizeUtf8(FileName). Do you wish to add an overloaded function for FileSize to LazFileUtils for backward compatibility? ---------------------------------------------------------------------- JuhaManninen · 2017-02-24 11:36 Quote from: GetMem on February 24, 2017, 12:16:07 pmFileSize form FileUtils points to LazFileUtils.FileSizeUtf8(FileName). Do you wish to add an overloaded function for FileSize to LazFileUtils for backward compatibility? Something like that. I didn't study the issue deeply now. Actually backward compatibility breaks when a function is moved to another unit, but sometimes it is needed. ---------------------------------------------------------------------- Windsurfer · 2017-02-27 19:16 I am not the best person to create a patch. My coding skills are not good enough to dabble in the LCL.