rsk82
rsk82

Reputation: 29437

How to check what character encoding is set on a console in which my program run?

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

Upvotes: 2

Views: 461

Answers (1)

Mark Ransom
Mark Ransom

Reputation: 308528

You can get the code page of the console attached to the current process with GetConsoleCP. I can't see a corresponding function that works with an arbitrary console handle.

Upvotes: 3

Related Questions