Which string type for a directory? lazarus / 21-General ---------------------------------------------------------------------- dietmar · 2021-09-07 16:37 Hello, I want to save a directory name in a string variable, the directory is chosen via SelectDirectoryDialog. There, Filename seems to be a normal string. Is that ok even for possible directory names in foreign languages with special characters, or what should I use here? Thx, --Dietmar ---------------------------------------------------------------------- Bart · 2021-09-07 16:44 You're on Lazarus. Just use String, not any other kind like UTF8String or RawByteString. You'll be fine with whatever you want to do with that string then, it will work in all file routines (like createfile) and things like TStrings.LoadFromFile etc. By default String is encoded as UTF8, and before passing it to the API's that handle files, it will be converted to UnicodeString/WideString on Windows at leats (*nix tends to use UTF8), so there will be no loss of information. Bart ---------------------------------------------------------------------- dietmar · 2021-09-07 17:05 Fantastic, thank you! --Dietmar