pigskin / kodi-gamepass

NFL Game Pass add-on for Kodi
Other
123 stars 83 forks source link

Force utf-8 encoding on game_info to prevent encoding issues for live games #370

Closed pyrocumulus closed 6 years ago

pyrocumulus commented 6 years ago

When creating the game info text for live games, it's possible Python will throw an UnicodeDecodeError if the special marking '[CR]» Live «' is added to game_info. I think this is because strftime() using the systems default encoding, which could still be ascii.

This commit forces it to be utf-8 which is better to use in Kodi+Python, as per the information found at https://forum.kodi.tv/showthread.php?tid=144677

This fixes issue #369

emilsvennesson commented 6 years ago

@pyrocumulus Thank you!