Skip to content

Commit

Permalink
TPythonEngine.ExecFile should use utf8 encoding in reading the file.
Browse files Browse the repository at this point in the history
  • Loading branch information
pyscripter committed Mar 28, 2024
1 parent 2e6faa3 commit 46cd7a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/PythonEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5182,7 +5182,7 @@ procedure TPythonEngine.ExecFile(const FileName: string; locals,
begin
SL := TStringList.Create;
try
SL.LoadFromFile(FileName);
SL.LoadFromFile(FileName, TEncoding.UTF8);
ExecStrings(SL, locals, globals, FileName);
finally
SL.Free;
Expand Down

0 comments on commit 46cd7a6

Please sign in to comment.