问题描述:新建.Net Core项目,出现System.NotSupportedException:“No data is available for encoding 1252(或Shift-JIS、GB2312). For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.”
检测:
1 EncodingInfo [] encodings= Encoding.GetEncodings(); 2 foreach (var i in encodings) 3 { 4 Console.WriteLi