@@ -5307,12 +5307,12 @@ function TPythonEngine.Run_CommandAsObjectWithDict(const command : AnsiString; m
5307
5307
5308
5308
procedure TPythonEngine.ExecStrings ( strings : TStrings );
5309
5309
begin
5310
- Py_XDecRef( Run_CommandAsObject( CleanString( AnsiString (strings.Text) ), file_input ) );
5310
+ Py_XDecRef( Run_CommandAsObject( CleanString( UTF8Encode (strings.Text) ), file_input ) );
5311
5311
end ;
5312
5312
5313
5313
function TPythonEngine.EvalStrings ( strings : TStrings ) : PPyObject;
5314
5314
begin
5315
- Result := Run_CommandAsObject( CleanString( AnsiString (strings.Text) ), eval_input );
5315
+ Result := Run_CommandAsObject( CleanString( UTF8Encode (strings.Text) ), eval_input );
5316
5316
end ;
5317
5317
5318
5318
procedure TPythonEngine.ExecString (const command : AnsiString; locals, globals : PPyObject );
@@ -5322,7 +5322,7 @@ procedure TPythonEngine.ExecString(const command : AnsiString; locals, globals :
5322
5322
5323
5323
procedure TPythonEngine.ExecStrings ( strings : TStrings; locals, globals : PPyObject );
5324
5324
begin
5325
- Py_XDecRef( Run_CommandAsObjectWithDict( CleanString( AnsiString (strings.Text) ), file_input, locals, globals ) );
5325
+ Py_XDecRef( Run_CommandAsObjectWithDict( CleanString( UTF8Encode (strings.Text) ), file_input, locals, globals ) );
5326
5326
end ;
5327
5327
5328
5328
function TPythonEngine.EvalString ( const command : AnsiString; locals, globals : PPyObject ) : PPyObject;
@@ -5332,12 +5332,12 @@ function TPythonEngine.EvalString( const command : AnsiString; locals, globals :
5332
5332
5333
5333
function TPythonEngine.EvalStrings ( strings : TStrings; locals, globals : PPyObject ) : PPyObject;
5334
5334
begin
5335
- Result := Run_CommandAsObjectWithDict( CleanString( AnsiString (strings.Text) ), eval_input, locals, globals );
5335
+ Result := Run_CommandAsObjectWithDict( CleanString( UTF8Encode (strings.Text) ), eval_input, locals, globals );
5336
5336
end ;
5337
5337
5338
5338
function TPythonEngine.EvalStringsAsStr ( strings : TStrings ) : String;
5339
5339
begin
5340
- Result := Run_CommandAsString( CleanString( AnsiString (strings.Text) ), eval_input );
5340
+ Result := Run_CommandAsString( CleanString( UTF8Encode (strings.Text) ), eval_input );
5341
5341
end ;
5342
5342
5343
5343
function TPythonEngine.CheckEvalSyntax ( const str : AnsiString ) : Boolean;
0 commit comments