SyntaxFix
Write A Post
Hire A Developer
Questions
In short, to ensure proper unicode handling in Python 2:
io.open
from __future__ import unicode_literals
print(text.encode('ascii', 'replace').decode())
For explanations, see @Alastair McCormack's detailed answer.