System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode.

传递给函数的路径是Load file C:\workspace\GitHub\ChuckLu\ChuckFork\FatAntelope\FatAntelope.CommandLine\bin\Debug\..\..\..\ConsoleApp1\sample\source.xml failed.

应该需要用GetFullPath处理一下

 

<?xml version="1.0" encoding="utf-8"?> 文件开头的编码和文件本身保存的编码不匹配,所以报错

System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode.

 

 

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-05
  • 2022-12-23
  • 2022-02-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-03
  • 2021-08-13
  • 2021-04-14
  • 2021-04-08
相关资源
相似解决方案