I think this may relate to how you have your keyboard set up.
Regardless of how your keyboard looks, when you set up your PC you specify which keyboard you are using. The PC then interprets keystrokes according to which key is pressed.
So, if the key on my keyboard showing the ' and @ symbols is pressed, the PC interprets this as the appropriate ASCII value. If my keyboard was set up as a different keyboard (different language etc) then the ASCII values sent depends on what that keyboard set up decrees, regardless of what the little symbol on the key itself says.
Kelvin
There! I just checked my own post and the correct characters were displayed.