When i press a keyboard key in windows (win 7) what's the encoding of the char the system sends to applications like text editor? Is it utf-8 encoded or mayby cp1252 for my polish language? What the Current system locale under Region Settings do and how does it affects programs like text editors?

  • My understanding is that it is Unicode. You can't restrict entry to only western language characters, and all cp1252 are included in Unicode. Take a look at Windows-1252. That is why you select a language/character set for non-Unicode programs.
    – user3169
    Nov 23, 2017 at 6:35
  • In the Region and Language control panel click on "What is system locale? in the Administrative panel for an explanation.
    – user3169
    Nov 23, 2017 at 6:35

1 Answer 1



The WM_CHAR message uses Unicode Transformation Format (UTF)-16.

The program could also listen for WM_UNICHAR or WM_KEYDOWN and WM_KEYUP.

In general, input in Windows is handled using window messages.

  • Ok i understand but as i asked what the 'Current system locale' under 'Region Settings' do and how does it affects programs like text editors?
    – Ringger81
    Nov 22, 2017 at 18:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .