Delphi 7, TFileStream cant open files with special characters
问题 This line: TFileStream.Create(fileName, fmOpenRead or fmShareDenyNone); drops an exception if the filename contain something like ñ 回答1: You are, ultimately calling CreateFileA , the ANSI API, and the characters you use have no ANSI encoding. The only way to get beyond this is to open the file with CreateFileW , the Unicode API. You might not realise that you call CreateFileA , but that's how the Delphi 7 file stream is implemented. One easy way to solve your problems is to upgrade to the