net core设置ftp编码报错
异常内容:'gb2312' is not a supported encoding name. For information on defining a custom encoding,see the documentation for the Encoding.RegisterProvider method.(Parameter 'name')
解决方案:项目中引用System.Text.Encoding.CodePages依赖
<PackageReference Include="System.Text.Encoding.CodePages" Version = "4.7.0"/> Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); Encoding encoding = Encoding.GetEncoding("gb2312")
本文来自博客园,作者:zwbsoft,转载请注明原文链接:https://www.cnblogs.com/zwbsoft/p/16269233.html
电话微信:13514280351