I have two strings read in from textfiles to compare and when I try to compare these files with winmerge or pspad, they both show as the same text strings. If I compare them with the following function, it fails:
string string1 = File.ReadAllText(@"c:\file1.txt");
string string2 = File.ReadAllText(@"c:\file2.txt");
bool stringMatch = false;
if (string1.Equals(string2, StringComparison.InvariantCulture)){
stringMatch = true;
}
//stringMatch is false here
After some searching it seems to be that a " and ' are different:
Content of file1.txt: é"'(§è!çà)- Content of file2.txt: é”’(§è!çà)-
Any way I can properly compare these two strings and match those " & ' characters?