As can be seen from screenshot, same script run from Terminal and Gedit behaves differently - in terminal script executes succesfully and in Gedit it raises error:
But if I change
python in Gedit tool manager to
PYTHONIOENCODING=utf-8 python, then script will execute fine also from Gedit
Why is this, and what setting in Terminal allows python "unicode" code to execute without issues?
Just to update as I added bounty: It's not just GEdit, but also in SciTE error is raised, but not in Geany as Geany executes Python scripts through terminal