I have the following code written in python 2.7
# -*- coding: utf-8 -*-
import sys
_string = "años luz detrás"
print _string.encode("utf-8")
this throws the following error:
print _string.encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
Any help appreciated, thanks in advance