Torrent file is in UTF-8 encoding
Status: Beta
Brought to you by:
baptiste_dubuis
It is said in http://en.wikipedia.org/wiki/Torrent_file that the torrent file is encoded as UTF-8.
I had troubles reading a torrent file containing file names with accents (éàè...)
The following code works fine:
final jBittorrentAPI.TorrentProcessor torrentProcessor = new jBittorrentAPI.TorrentProcessor();
final Map<?, ?> parseTorrent = torrentProcessor.parseTorrent(torrentFile);
final jBittorrentAPI.TorrentFile jBittorrentFile = torrentProcessor.getTorrentFile(parseTorrent);
String name = (String) jBittorrentFile.name.get(i);
String nameAsUtf8 = new String(name.getBytes(), "UTF-8");