On Mon, Apr 9, 2012 at 2:18 PM, Jürgen Hestermann <[email protected]> wrote: > Marcos Douglas schrieb: > >> For the Lazarus sources yes, but not for RTL. >> I still think about: >> DirectoryExists or DirectoryExistsUTF8 >> ForceDirectoriesUTF8 or ForceDirectories >> Pos or UTF8Pos >> etc >> Depends what part of code you are... > > > Yes, it's a real pain. I once used the Windows API function "CopyFile" and > because I knew that this API function uses Ansi coding I prepared my code > like this. But after some months my program suddenly crashed because someone > named a file my program reads with german umlauts. I then discovered that a > CopyFile function exists within the LCL too! Who did build this trap?
Because this I do not like use functions/procedures without a prefix or unit (as a prefix). IMHO, every function should be used with a prefix (unit or real prefix)... but this is other discussion. ;-) > You cannot use the same name for an existing API function and then silently > convert it to UTF8 in the background (not even mention this on > http://lazarus-ccr.sourceforge.net/docs/lcl/fileutil/copyfile.html ). This > kind of issue hits me very often. Do your own functions (like I said above) or use unit.function syntax. Marcos Douglas -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
