Alright, I've found
this thread and
this page, and neither seem to be helping me at all.
From what I've read, if a filename contains a unicode character, it needs to be converted to UTF-8. This is an example of how my code was before:
if OpenDialog.Execute then
begin
LoadedFile := TMemoryStream.Create;
LoadedFile.LoadFromFile(OpenDialog.FileName);
end;
Of course, when loading a file with a unicode character in its name, it would error and say that it could not be opened. So I tried this:
if OpenDialog.Execute then
begin
LoadedFile := TMemoryStream.Create;
LoadedFile.LoadFromFile(SysToUTF8(OpenDialog.FileName));
end;
But it still errored. I also tried AnsiToUTF8, and as a last ditch effort, ExpandFileNameUTF8, but they all resulted in the same error.
So, what am I missing? From what I'm reading, this should be right, shouldn't it?