I can confirm the bug Yuri reported and it doesn't help to have # -*- coding: utf-8 -*- at the top of a file, since it isn't considered by py-execute-region if it's not included in the selection. which defies the purpose of evaluating a region.
An example. Give this file
{{{
# -*- coding: utf-8 -*-
print "ö"
}}}
Using py-execute-buffer works fine, since it send
# -*- coding: utf-8 -*-
to the interpreter.
Now select `print "ö"' and use py-execute-region. It will trigger the error mention by Yuri, since it doesn't send the encoding information to the interpreter.
Andreas,
I can confirm the bug Yuri reported and it doesn't help to have # -*- coding: utf-8 -*- at the top of a file, since it isn't considered by py-execute-region if it's not included in the selection. which defies the purpose of evaluating a region.
An example. Give this file
{{{
# -*- coding: utf-8 -*-
print "ö"
}}}
Using py-execute-buffer works fine, since it send
# -*- coding: utf-8 -*-
to the interpreter.
Now select `print "ö"' and use py-execute-region. It will trigger the error mention by Yuri, since it doesn't send the encoding information to the interpreter.
Best,
Maik