[Lazarus] Unicode on Windows
Jürgen Hestermann
juergen.hestermann at gmx.de
Mon Apr 9 19:18:15 CEST 2012
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? 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.
More information about the Lazarus
mailing list