ReadConsoleInputA doesn't return correct double-byte characters in Windows 8 and Windows 10


When you run the ReadConsoleInputA function in Windows 8 or Windows 10, the function fails to return the correct double-byte characters (DBCS). Applications that use the ReadConsoleInputA function to read keyboard input from the console may experience unexpected behavior, or they may crash. Applications that call C run-time functions such as _getch() are also affected.


The ReadConsoleInputA function does not advance to the second character code of a DBCS character when a single INPUT_RECORD structure is read in each call.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.


To work around this issue, use one of the following methods: 
  • Use the ReadConsoleInputW function or the corresponding Unicode version of the C run-time function, such as _getwch().
  • Read two INPUT_RECORD structures when you call ReadConsoleInputA.

Article ID: 3165318 - Last Review: May 19, 2016 - Revision: 1

Windows 8, Windows 8.1, Windows 10