If you try to encode a string using ASCII encoding, it will be converted to a question mark, since there is no such character in the ASCII character set. The character code for the question mark is 63.
You need to use an encoding that supports the character in order to get its actual character code.
Encoding.Default , . , , .
- 8218, int:
int characterCode = (int)'‚';
- , , .