在Windows IIS上的.NET Core 2.0中,我正在将一个部分html文件读入字符串:
string sWelcomeContent = System.IO.File.ReadAllText(welcomepagePath, System.Text.Encoding.GetEncoding(1252));
Run Code Online (Sandbox Code Playgroud)
这很正常,但很少(去年发生过两次),我收到一个错误:System.NotSupportedException:没有数据可用于编码1252.
任何想法为什么会这样?
asp.net-core ×1