It’s not ascii related but keyboard mapping related. I assume your pc is not using QWERTY / American layout? You need to find which symbol is at the same place as your # on a US keyboard and send that character
It worked! It's the backslash (\). That did come with its own problem though. It broke the syntax (I'm guessing, since it changed the color of the quoted text) and only returned text instead of #text.
I worked around that by going the ASCII rout for the backslash