From ffd17b70a3f62d47ed545bdd3eae525d9f70e878 Mon Sep 17 00:00:00 2001 From: whr819987540 <819987540@qq.com> Date: Thu, 4 May 2023 17:29:53 +0800 Subject: [PATCH] add encoding to .torrent default config --- metainfo/metainfo.go | 1 + 1 file changed, 1 insertion(+) diff --git a/metainfo/metainfo.go b/metainfo/metainfo.go index cd787260..dc89ac22 100644 --- a/metainfo/metainfo.go +++ b/metainfo/metainfo.go @@ -64,6 +64,7 @@ func (mi MetaInfo) Write(w io.Writer) error { func (mi *MetaInfo) SetDefaults() { mi.CreatedBy = "github.com/anacrolix/torrent" mi.CreationDate = time.Now().Unix() + mi.Encoding = "UTF-8" } // Creates a Magnet from a MetaInfo. Optional infohash and parsed info can be provided.