To this day, I have used two ways to convert — one was:
PWideChar(UnicodeString(MyString))
and the other was:
PWideChar(UTF8ToUTF16(MyString))
Both worked, without any extra things. But I found it strange that the same conversion (regular
String to
PWideChar) could be solved in different ways. It seemed to me that they are not unambiguous. And now
@ASerge gave another one, this time using the
UTF8Decode function and
UnicodeString as a temp variable (and other initialization functions, which is more complex that simple casting/converting).
Actually all these ways are correct?
Ultimately, I used
ExecuteProcess because it allows me to skip the conversion (there is a version for
RawByteString), and secondly, I can open the directory in the file explorer and additionally select the file, if it should be selected. The only problem is that I can't select multiple files this way — I tried various ways to use the
/select parameter, but it didn't do anything.
Anyone have an idea how to open a directory in the system file explorer and highlight a few files? Is such a thing possible?