while reading the forum I found this thread: http://forum.xbmc.org/showthread.php?tid...pid1039311
I did a few tests and can confirm that it is very easy to reproduce and effects most addons - in a not so unrealistic scenario:
- You just need an unicode letter in the xbmc path (which contains the windows-username on windows7). Not sure on the other OS's...
You can easy reproduce this (or test your addons) with starting xbmc in portable mode (add "-p" to you xbmc start shortcut) from a xbmc folder which contains an unicode letter, "ä" or "é" for example.
So just download xbmc again, install it to "C:\folder-with-unicode-ä-é\xbmc" and start "C:\folder-with-unicode-ä-é\xbmc\xbmc.exe -p".
You can also test it with starting xbmc with a local windows username which contans unicode-letters.
I cloned the eden plugins repo and got ~200 line matches without a real unicode decoding:
Code:
getAddonInfo('path')This effects all path's returned by getAddonInfo (because it returns string - not unicode) - you ALWAYS have to decode it properly.
In most cases the addons are using this path for icons, something like:
Code:
ICON = os.path.join(ADDON.getAddonInfo('path'), 'icon.png')More bad is something like:
Code:
f = open(os.path.join( __settings__.getAddonInfo('profile'), "allmovies"),'wb')But it can even avoid some addons from running with something like this:
Code:
sys.path.append(os.path.join(Addon(ADDON_ID).getAddonInfo("path"), "resources", "lib" ))
import module_in_the_above_pathMaybe a better solution would be that xbmc would return unicode-instances (and not str)...
Until that we have to do something like:
Code:
Addon.getAddonInfo('path').decode('utf-8')Don't get me wrong - my Addons are also affected...
regards,
sphere

![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)
![[Image: fanarttv.png]](http://trakt.us/images/thanks/fanarttv.png)

Search
Help