code-google-com / mythbox

Automatically exported from code.google.com/p/mythbox
GNU General Public License v2.0
0 stars 1 forks source link

ascii code can't encode character u'\u0161 #151

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open MythBox 
2. Select EPG
3. Select some program name with special czech character

Trace log:

nicodeEncodeError: 'ascii' codec can't encode character u'\u0161' in position 
1: ordinal not in range(128)
ERROR | mythbox.ui | tvguide.py | MainThread | Line 328 | 'ascii' codec can't 
encode character u'\u0161' in position 1: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/milosn/.xbmc/addons/script.mythbox/resources/src/mythbox/ui/tvguide.py", line 326, in watchLiveTv
    brain.watchLiveTV(channel)
  File "/home/milosn/.xbmc/addons/script.mythbox/resources/src/mythbox/ui/livetv.py", line 87, in watchLiveTV
    xbmcgui.Dialog().ok(self.translator.get(m.INFO), str(se))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0161' in position 
1: ordinal not in range(128)
ERROR | mythbox.ui | tvguide.py | MainThread | Line 328 | 'ascii' codec can't 
encode character u'\u0161' in position 1: ordinal not in range(128)
Traceback (most recent call last):

Mythbox version 1.0.1, XBMC 10

Thanks. Milos Novotny

Original issue reported on code.google.com by nso...@gmail.com on 22 Jan 2011 at 12:18

GoogleCodeExporter commented 9 years ago
Ahoj mám naprosto stejný problém jako ty, Pouzivam Mythbox 1.0.2 , nasel sji 
nekde reseni??cau Aleš

Original comment by ales.oha...@gmail.com on 11 Feb 2011 at 9:15

GoogleCodeExporter commented 9 years ago
Hi,
the solution is very easy - in the XBMC installation directory find the 
python24.zip which contains Python's standard library. Modify site.py file in 
this file - search for setencoding() function and modify the system's default 
encoding - the default is ascii, I have changed it to "utf-8" under Ubuntu 
10.10. Zip the file back and replace the original python24.zip . With this 
modification the current status of DVB cards is show correctly and commercial 
skipping works fine.

Regards,
Jan Svec

Original comment by honza.svec on 17 Mar 2011 at 11:24

GoogleCodeExporter commented 9 years ago
Please try again with the trunk release.

Original comment by semir.pa...@gmail.com on 27 Mar 2011 at 1:46

GoogleCodeExporter commented 9 years ago

Original comment by semir.pa...@gmail.com on 30 Dec 2011 at 9:34