parse-torrent icon indicating copy to clipboard operation
parse-torrent copied to clipboard

Support utf-8 encoded comment field

Open mayswind opened this issue 1 year ago • 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

mayswind avatar Dec 03 '23 07:12 mayswind

where did this happen in real-world cases?

ThaUnknown avatar Dec 03 '23 10:12 ThaUnknown

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.

mayswind avatar Dec 03 '23 10:12 mayswind