Could you please tell why the Asc() function returns incorrect result?
Dim TestChar = Chr(128)
Dim CharInt = Asc(TestChar) ' this is a mistake on Windows 7 x64. Asc(TestChar) returns 136 instead of 128
I executed this code on another computer and the result was 128.
Thanks.
Your computer is using a different default code page.
The
Ascfunction uses the system’s current ANSI code page.The
Chrfunction simply casts the value tochar. (Unless it’s> 255)