webtorrent/parse-torrent

Support utf-8 encoded comment field

mayswind opened this issue · 2 comments

What version of this package are you using?
11.0.14

What problem do you want to solve?
Comment field in torrent files which generated in old application would not use utf-8 as default character encoding, and there files also have an extra utf-8 encoded field, like comment.utf-8. The comment field in these torrent files would have garbled characters by using parse-torrent (see the below screenshot).

image

What do you think is the correct solution to this problem?
Parse the comment content from the utf-8 encoding field first, like processing the name field.

Are you willing to submit a pull request to implement this change?
Yes

where did this happen in real-world cases?

where did this happen in real-world cases?

Actually, I opened some old torrent files and found this problem. I think it's not a good idea to put those torrents here directly, so I made the a testcase file and put it to #178.