Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't change BOM for existing project files - fixes #2271 #2575
As mentioned in #2271, some project files have a BOM (created by VS), others don't (from Ionide/Forge), so to know what "unchanged" means, we have to probe the original file and set the encoding for writing the XML file accordingly. We only consider UTF-8 because it seems safe to assume all project files will have that.
Updated with a better way to get the bytes to compare against.
@forki What did you mean earlier with "What happens if it's 3 bytes"? If the file is shorter than what we're trying to read,