[Solved]: XML parsing: unrecognized encoding - Free Asp.Net,MVC,AngularJs,Jquery,Javascript,Sql Server,WCF,Entity framework snippets and tutorial


[Solved]: XML parsing: unrecognized encoding

In this article I am going to explain how to solve the XML parsing: line 1, character 39, unrecognized encoding error.

Description:
When I am working on XML file I have got an error “XML parsing: line 1, character 39, unrecognized encoding” in asp.net.

Solution:
This error is occurred because of encoding issue. SQL Server expects the XML file should be UTF-16. We have to change the encoding from utf-1, utf-8 to utf-16.

Example:
<?xml version="1.0" encoding="utf-1" ?>

Change to

<?xml version="1.0" encoding="utf-16" ?>

Hope this solution will be work for you.




What do you think about this article?

If you found this article useful, please share and follow on Facebook, Twitter, Google Plus and other social media websites. To get free updates subscribe to newsletter. Please put your thoughts and feedback in comments section.

Share this

Share on FacebookTweet on TwitterPlus on Google+
loading...


EmoticonEmoticon