My task was to write a script that would be transferred from the php variable in python script, there is a variable return, and php variable output. But the problem arose when the return value of the variable (Russian text). Php code:
$hello = 'Виктор';
$result = shell_exec('main.py ' . $hello);
echo $result;
Python code:
# -*- coding: utf-8 -*-
import sys
text = sys.argv[1]
print (text)
Both files in utf-8 without BOM. Tried and .htaccess, it did not help. Result:������. Any idea how this can be fixed a? I w7, python 3.5, editor of np ++.