I have a complaint from an Italian user that the question and the answer appear to be the same, but are being marked wrong. In looking at the entered text, the correct is “Bene, grazie.” and the answer is “Bene, grazie.” They appear to be the same, but in looking at the length dim i As integer = Len(myAns) one is 13 and the other 14. What might cause this? Encoding? How do I prevent the problem?
[quote=281100:@Roger Clary]I have a complaint from an Italian user that the question and the answer appear to be the same, but are being marked wrong. In looking at the entered text, the correct is “Bene, grazie.” and the answer is “Bene, grazie.” They appear to be the same, but in looking at the length dim i As integer = Len(myAns) one is 13 and the other 14. What might cause this? Encoding? How do I prevent the problem?
TIA[/quote]
Possibly composed vs not composed (or decomposed)
Some characters can be represented in 2 ways
with two separate unicode code points
for instance
the first for a character that CAN have an accent grave applied (say an e)
the second maybe for the combining accent grave
so you get è as the end result
as a SINGLE unicode code points that is “e with accent grave”
you’ll get 2 different counts for this case
visually they look the same
Here’s an example
dim t as string = &u00e8
dim t1 as string = "e" + &u0300
if t = t1 then
msgbox "equal"
else
msgbox "not equal"
end if
Now something the NEW TEXT type handles is EXACTLY this difference
Try this
dim t as text = &u00e8
dim t1 as text = "e" + &u0300
if t = t1 then
msgbox "equal"
else
msgbox "not equal"
end if
Precomposed vs. decomposed is a PITA. Once upon a time I really thought I was going senile because of this. Do a EncodeBase64 with the answer of the customer and write it to a log file. Then have the customer send it to you.