sys.setdefaultencoding('utf-8') is not working
#1
Hello scripters ..

The function sys.setdefaultencoding('utf-8') is not working for me in
xbmc 9.04 with linux

Do I miss something ?

12:57:39 T:2863659920 M:1245786112 NOTICE: 'ascii' codec can't decode byte 0xc3 in position 16: ordinal not in range(128)
12:57:39 T:2863659920 M:1245786112 ERROR: Scriptresult: Error

The error occur because a non-ascii char inside a configuration-file.
I did try to change the sys.setdefaultencoding to UTF-8 without any success.

Regards Hans
Reply
#2
@linuxluemmel
What's the error coming from?
Maybe try unicode(your_variable, 'utf-8') and see if it helps with what you're doing...
Reply

Logout Mark Read Team Forum Stats Members Help
sys.setdefaultencoding('utf-8') is not working0