Thursday, January 12, 2017

Remove BOM from string

Problem: Sometimes due to BOM (Binary object Mark) string couldn't be loaded into XMLDocument etc.


Solution:


Replace string


string str_xml = <xml in string format>
str_xml = str_xml.Replace("\ufeff", "");









No comments:

Post a Comment