On 1 April 2016 at 16:55, Denis Kozlov <dez...@gmail.com> wrote: > In Lazarus 1.4.4, GetAppConfigDirUTF8 and GetAppConfigFileUTF8 internally > use GetAppConfigDirAnsi and GetAppConfigFileAnsi (unless running on Windows > CE), respectively. These functions call ANSI version of Windows API and > then map the result into UTF8. > > If there are characters in the path which do not exist in your current > system ANSI code page, then you would get question marks instead, > e.g. "Configura??es". >
This issue also affects Lazarus 1.6 and FPC 3.0+. GetWindowsSpecialDir in FPC 3.0.0 and trunk has severe encoding and buffer overrun issues. SHGetFolderPath links to SHGetFolderPathW if FPC_UNICODE_RTL is defined. But GetWindowsSpecialDir still calls it as SHGetFolderPathA, passing under-sized PChar buffer instead of PWideChar. Working on a fix. Denis
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus