I have a function (vbscript) that will compare two strings at the ASCII level, this may tell you where the differences lie (also attached in a text file with proper indentation).
Hope this helps
Dave
'Description: Compares the ASCII Values of two strings and highlights differences
'Parameters: pString1 - first piece of text to compare
' pString2 - second piece of text to compare
Sub CompareAsciiValuesOfText(pString1, pString2)
Dim aString1(), aString2()
Dim sThisLetter, sThisAsc
Dim iEnd
call Log.AppendFolder("Analysing string differences","CompareAsciiValuesOfText() Looking at the ASCII values of the strings")
'Code doesnt handle empty strings so exit
If pString1 = "" or pString2 = "" Then
Log.Message "Empty string", "PrintAndCompareAsciiValuesOfText() pString1 or pString2 is empty - code doesn't handle this, exiting sub."
call Log.PopLogFolder
Exit sub
End If
Dim x
For x = 1 to len(pString1)
ReDim Preserve aString1(x)
sThisLetter = mid(pString1,x,1)
sThisAsc = Asc(sThisLetter)
aString1(x) = "ASCII Letter= " & sThisLetter & chr(13) & "ASCII number=" & sThisAsc
Next
For x = 1 to len(pString2)
ReDim Preserve aString2(x)
sThisLetter = mid(pString2,x,1)
sThisAsc = Asc(sThisLetter)
aString2(x) = "ASCII Letter= " & sThisLetter & chr(13) & "ASCII number=" & sThisAsc
Next
If ubound(aString1) = ubound(aString2) Then
call Log.Message("String lengths are the same ","Length of both strings: " & ubound(aString1))
else
call log.Warning("String lengths are different","Length of String1: " & ubound(aString1) & chr(13) & "Length of String2: " & ubound(aString2))
End If
'now loop through them both - we can only end at the shortest string
If ubound(aString1) > ubound(aString2) Then
iEnd = ubound(aString2)
else
iEnd = ubound(aString1)
End If
For x = 1 to iEnd
'highlight any differences in characters
If aString1(x) <> aString2(x) Then
call log.Warning ("Mismatch at character position " & x,"String 1:" & chr(13) & Left(pString1,x) & chr(13) & chr(13) & "String 2:" & chr(13) & Left(pString2,x))
call log.Warning ("ASCII details","String 1 position " & x & ":" & chr(13) & aString1(x) & chr(13) & chr(13) & "String 2 position " & x & ":" & chr(13) & aString2(x))
End If
Next
call Log.PopLogFolder
End Sub