A frequently recommended "fix" for those problems is to use the UnicodeString(/WideString) variants of the API calls (IIRC, SHGetSpecialFolderPathW in this case), to avoid the potential problems with automatic Windows codepage and UTF-8 conversions which might happen with ANSIString.