1、添加Nuget引用【System.Text.Encoding.CodePages】 2、添加注册代码:Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);