{"action":"created","issue":{"url":"https://api.github.com/repos/Kodi-vStream/venom-xbmc-addons/issues/2050","repository_url":"https://api.github.com/repos/Kodi-vStream/venom-xbmc-addons","labels_url":"https://api.github.com/repos/Kodi-vStream/venom-xbmc-addons/issues/2050/labels{/name}","comments_url":"https://api.github.com/repos/Kodi-vStream/venom-xbmc-addons/issues/2050/comments","events_url":"https://api.github.com/repos/Kodi-vStream/venom-xbmc-addons/issues/2050/events","html_url":"https://github.com/Kodi-vStream/venom-xbmc-addons/issues/2050","id":319371792,"number":2050,"title":"encodage caractères accentués : synopsis film","user":{"login":"nekcorp","id":3597338,"avatar_url":"https://avatars2.githubusercontent.com/u/3597338?v=4","gravatar_id":"","url":"https://api.github.com/users/nekcorp","html_url":"https://github.com/nekcorp","followers_url":"https://api.github.com/users/nekcorp/followers","following_url":"https://api.github.com/users/nekcorp/following{/other_user}","gists_url":"https://api.github.com/users/nekcorp/gists{/gist_id}","starred_url":"https://api.github.com/users/nekcorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekcorp/subscriptions","organizations_url":"https://api.github.com/users/nekcorp/orgs","repos_url":"https://api.github.com/users/nekcorp/repos","events_url":"https://api.github.com/users/nekcorp/events{/privacy}","received_events_url":"https://api.github.com/users/nekcorp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-05-02T00:23:56Z","updated_at":"2018-05-05T11:26:34Z","closed_at":null,"author_association":"NONE","body":"Bonjour,\r\n\r\nMerci pour votre travail, c'est super génial ce que vous faites. Pouvez vous me dire comment vous faites pour que sous Kody les caractères accentués, apostrophes etc .... soient écrit correctement, comment encodez vous où décodez vous le texte ? Je vous demande ça car je suis entrain d'essayer d'apporter ma pierre à l'édifice. J'arrive à récupérer les titres, genre, images liens des films d'un site web, sous Kodi tout fonctionne sauf la retranscription des caractères accentués. J'ai une variable _description_ qui reprend la synopsis du film et qui est du type : **<type 'unicode'>**, mais en faisant un description.decode(\"utf-8\") j'ai toujours pas les caractères correctement accentués sous Kodi. Je bloque dessus depuis hier. Merci pour votre aide. "},"comment":{"url":"https://api.github.com/repos/Kodi-vStream/venom-xbmc-addons/issues/comments/386798739","html_url":"https://github.com/Kodi-vStream/venom-xbmc-addons/issues/2050#issuecomment-386798739","issue_url":"https://api.github.com/repos/Kodi-vStream/venom-xbmc-addons/issues/2050","id":386798739,"user":{"login":"nekcorp","id":3597338,"avatar_url":"https://avatars2.githubusercontent.com/u/3597338?v=4","gravatar_id":"","url":"https://api.github.com/users/nekcorp","html_url":"https://github.com/nekcorp","followers_url":"https://api.github.com/users/nekcorp/followers","following_url":"https://api.github.com/users/nekcorp/following{/other_user}","gists_url":"https://api.github.com/users/nekcorp/gists{/gist_id}","starred_url":"https://api.github.com/users/nekcorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekcorp/subscriptions","organizations_url":"https://api.github.com/users/nekcorp/orgs","repos_url":"https://api.github.com/users/nekcorp/repos","events_url":"https://api.github.com/users/nekcorp/events{/privacy}","received_events_url":"https://api.github.com/users/nekcorp/received_events","type":"User","site_admin":false},"created_at":"2018-05-05T11:26:34Z","updated_at":"2018-05-05T11:26:34Z","author_association":"NONE","body":"@TmpName Merci pour ta réponse, voilà ce que j'ai lorsque je ne met aucun encodage :\r\n`li.setInfo('video', {'title': stream['name'], 'genre': stream['genre'], 'mediatype': \"video\", 'plot' : stream['description']})`\r\n\r\nhttps://ibb.co/mvecB7\r\n\r\nLorsque je met decode('utf-8') j'ai le même résultat : \r\n\r\n`li.setInfo('video', {'title': stream['name'], 'genre': stream['genre'], 'mediatype': \"video\", 'plot' : stream['description'].decode('utf-8'})`\r\n\r\nJ'ai ce message d'erreur : \r\n\r\n> 13:21:30.594 T:3088   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--\r\n                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!\r\n                                            Error Type: <type 'exceptions.UnicodeEncodeError'>\r\n                                            Error Contents: 'ascii' codec can't encode characters in position 46-50: ordinal not in range(128)\r\n                                            Traceback (most recent call last):\r\n                                              File \"C:\\Users\\user\\AppData\\Roaming\\Kodi\\addons\\plugin.video.test_video\\addon.py\", line 202, in <module>\r\n                                                show_streams(TAG)\r\n                                              File \"C:\\Users\\user\\AppData\\Roaming\\Kodi\\addons\\plugin.video.test_video\\addon.py\", line 45, in show_streams\r\n                                                'plot' : stream['description'].decode('utf-8')})\r\n                                              File \"C:\\Program Files (x86)\\Kodi\\system\\python\\Lib\\encodings\\utf_8.py\", line 16, in decode\r\n                                                return codecs.utf_8_decode(input, errors, True)\r\n                                            UnicodeEncodeError: 'ascii' codec can't encode \r\n\r\nLe caractère en question c'est le premier apostrophe présent dans le texte : https://pastebin.com/wQeDvGZt \r\n"}}
{"actor":{"display_login":"nekcorp"}}