X-Git-Url: https://git.phdru.name/?p=extfs.d.git;a=blobdiff_plain;f=torrent;h=825293bab59d1a601abb6cb72688c273ca7bc9e8;hp=712a653be9948ecf56d81c9797f70dbd7dc611c7;hb=f09a1d179bd8414db9d273264d81288cf3db5b05;hpb=8a9eba16c0a20cdab62252b8c0d3408969f97768 diff --git a/torrent b/torrent index 712a653..825293b 100755 --- a/torrent +++ b/torrent @@ -89,6 +89,8 @@ def mctorrent_list(): if 'length' not in info: torrent_error('Unknown length') length = info['length'] + if charset and encoding and (charset != encoding): + name = name.decode(encoding, 'replace').encode(charset, 'replace') paths = [(name, length)] meta = []