View Single Post
Posts: 58 | Thanked: 19 times | Joined on Jan 2012 @ Finland
#1023
Originally Posted by slarti View Post
The output should already be encoded correctly with the .encode('utf-8') in the end. Worked for my finnish entries as far as I remember. What is the error exactly?
The print line below gives me error about non ASCII chars, which are in this case the letter "ä". If they are replaced with "a", script runs without error.
Code:
if (datetime.now() + timedelta(days_ahead)) < events_list[0][0]:
        print ('Ei tapahtumia %s päivään' % (days_ahead)).encode('utf-8')
I did $ locale -a to see what locales are installed in my device, and get fi and fi_FI. I tried to modify code with encode('fi_FI.utf-8'), but no luck.