# Fix a torrent file encoding

Published on

Sometimes, when you open a torrent file, the non-Latin letters in the file names will appear garbled. Apparently, some programs write the utf-8 name in the field path.utf-8 and write the field path in some other encoding.

I wrote a small Perl script that fixes such torrent files by copying the path.utf-8 field into the path field. To fix the torrent file: