How to check what character encoding is installed on the console in which my program runs?

I know that it can be checked by the user with the command chcp. Here I ask how to do this from another program using a handle to the console process.

+3
source share
1 answer

You can get the console code page attached to the current process with GetConsoleCP. I do not see the corresponding function that works with any console descriptor.

+3
source