кодировки на андроиде

pull/1/head
inpos 2016-03-21 07:48:25 +03:00
parent 0e541e9a68
commit 0f5c8de27b
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.module.pyrrent2http" name="pyrrent2http" version="0.9.2" provider-name="inpos">
<addon id="script.module.pyrrent2http" name="pyrrent2http" version="0.9.3" provider-name="inpos">
<requires>
<import addon="xbmc.python" version="2.14.0"/>
<import addon="script.module.libtorrent" />

View File

@ -49,14 +49,14 @@ def unicode_msg(tmpl, args):
return msg % tuple(arg_)
def encode_msg(msg):
msg = isinstance(msg, unicode) and msg.encode(True and sys.getfilesystemencoding() or 'utf-8') or msg
msg = isinstance(msg, unicode) and msg.encode(sys.getfilesystemencoding() != 'ascii' and sys.getfilesystemencoding() or 'utf-8') or msg
return msg
def localize_path(path):
if not isinstance(path, unicode): path = path.decode(chardet.detect(path)['encoding'])
if not sys.platform.startswith('win'):
path = path.encode(True and sys.getfilesystemencoding() or 'utf-8')
path = path.encode(sys.getfilesystemencoding() != 'ascii' and sys.getfilesystemencoding() or 'utf-8')
return path
def can_bind(host, port):