Strip BOM from a File or Text

The following code removes the BOM (Byte Order Mark) from texts. Some text editors add that while saving files. Sometimes this leads to problems while reading or converting text files (e.g. XML files). The code removes the BOM and Zero White Spaces from the string and returns the clean string. /// <summary> /// Strips the…
Weiterlesen