Handmade Hero»Forums»Code
edward
2 posts
Q: Visual Studio Watch/Memory Windows Symbols
Edited by edward on
Hi there all,

I apologize ahead of time if this question is misplaced here on the forum or downright unecessary/irrelevant. I have tried Google/Stackoverflow, this forum, the twitch stream chat etc. and have been unable to find an answer. This is something that was likely mentioned for 10-15 seconds during one of the 5 intro to C on windows streams, however, I have watched them all and was unable to find it anywhere. So...without any more prefacing: what is this stuff?! (screenshot attached)
Mārtiņš Možeiko
2565 posts / 2 projects
Q: Visual Studio Watch/Memory Windows Symbols
Those are symbols from (most likely) Windows-1252 encoding of memory bytes. On the left side you can see actual values of memory. And on right you can see same values as "symbols". Here is table that is used to get those "symbols" from byte values: https://en.wikipedia.org/wiki/Windows-1252#Code_page_layout

So for example value "32" will give you space symbol " ". Value "72: is "H" symbol. And so on...

If you would write this in C code:
1
char ch = (char)72;

And inspect what value does ch variable contain in debugger, you would see "H" symbol.

All unprintable symbols (like with value 0 or 1 and similar) are displayed as "." symbol.
edward
2 posts
Q: Visual Studio Watch/Memory Windows Symbols
@mmozeiko thank you very much for your explanation! this is along the lines of my best possible guess but something was itching my curiosity to try and find out for sure.