I'm modifying an old VB6 program and discovered something surprising.
When comparing strings, VB seems to compare always according Unicode values and not Ascii ones.
For example:
When in fact it's comparing &H20AC (128 translated to Unicode) and &H2019 (146 translated to Unicode).Code:If Chr$(128) > Chr$(146) Then MsgBox "128 is greater than 146!" End If
Is there anything to do other than creating a function to compare Ansi?
Note: I don't need this function, I have already written one. My question is just curiousity wheter there's any other way to do it.




Reply With Quote
