I'm tring to set the default encoding of my console to UTF-8 so it can display cyrillic letters and accented letters.
Here is my code:
from Parser import parser
import sys
print sys.getdefaultencoding()
sys.setdefaultencoding('utf-8')
Output:
ascii
Traceback (most recent call last):
File "C:\Users\Sergio.Tapia\Documents\NetBeansProjects\BabylonPython\src\TestingGrounds.py", line 5, in <module>
sys.setdefaultencoding('utf-8')
AttributeError: 'module' object has no attribute 'setdefaultencoding'
The weird thing is, when pressing the '.' after sys to see what method it has, setdefaultencoding is shown as a possible choice. Any suggestion on what to do?