From c815b201430dd7af725bba6b9dcac38662ffc0de Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 6 Apr 2025 15:08:47 +0300 Subject: [PATCH] Fix(torrent): `encoding` is integer like `866` Not a string like `'cp866'`. --- torrent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torrent b/torrent index 396a61e..a1f5d4b 100755 --- a/torrent +++ b/torrent @@ -396,7 +396,7 @@ def decode_torrent(): if encoding: encoding = encoding.decode('ascii') elif codepage: - encoding = codepage.decode('ascii') + encoding = str(codepage) else: for encoding in ('ascii', 'utf-8', default_encoding): try: -- 2.39.5