You are not logged in.
Pages: 1
I encountered an issue with `GetSystemPath` when dealing with Unicode paths. Specifically, the function returns an incorrect path for usernames containing Unicode characters. It seems that Lazarus's `GetAppConfigDir(False)` handles this correctly, likely because it uses `SHGetFolderPathW` (the wide-character version) instead of `SHGetFolderPath`, which mORMot relies on. This difference in API calls might cause incorrect path handling in mORMot.
Has anyone else faced this, and are there any known workarounds or fixes?
Offline
This is indeed a Lazarus/FPC issue only, because Delphi uses either an UnicodeString or a pure AnsiString compatible with the API.
Lazarus forces the AnsiString codepage to the CP_UTF8, which fails indeed with this API.
I made a code review, and it seems to appear only twice in our code base:
https://github.com/synopse/mORMot2/commit/156e7abd
https://github.com/synopse/mORMot2/commit/98b32952
Thanks for the feedback!
Offline
Pages: 1