This question is language agnostic but is inspired by these c/c++ questions.
How to convert a single char into an int
Char to int conversion in C
Is
Both the C++ Standard and the C standard require that this be so, for C++ and C program text.