From 1ef8ad240095bdbc7b3471e82270d6c809b20364 Mon Sep 17 00:00:00 2001 From: huoshan12345 Date: Tue, 10 Sep 2024 01:03:45 +0800 Subject: [PATCH] use utf8 for DirectoryNameUtf8 --- BencodeNET/Torrents/TorrentParser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BencodeNET/Torrents/TorrentParser.cs b/BencodeNET/Torrents/TorrentParser.cs index 8211f0001..6df8d2f9e 100644 --- a/BencodeNET/Torrents/TorrentParser.cs +++ b/BencodeNET/Torrents/TorrentParser.cs @@ -237,7 +237,7 @@ protected virtual MultiFileInfoList ParseMultiFileInfo(BDictionary info, Encodin var list = new MultiFileInfoList { DirectoryName = info.Get(TorrentInfoFields.Name)?.ToString(encoding), - DirectoryNameUtf8 = info.Get(TorrentInfoFields.NameUtf8)?.ToString(encoding) + DirectoryNameUtf8 = info.Get(TorrentInfoFields.NameUtf8)?.ToString(Encoding.UTF8) }; var fileInfos = info.Get(TorrentInfoFields.Files).Cast()