Sending UTF-8 keycodes instead of UTF-16 in Windows 10

Native 'Unicode' programs in Windows always deal with UTF-16. This is not new to Win10 – it has been the case in Win7, WinXP, Win2000, the whole Windows NT series.

However, to retain compatibility with very old (Win98-era) software, Windows has a dual API – practically every function which works with strings has two versions behind the scenes, an 'Unicode' version such as CreateFileW() which uses UTF-16, and an 'ANSI' version such as CreateFileA() which uses legacy Windows-125x charsets. The programmer simply writes "CreateFile()" and it's replaced with one or the other when compiling.

But many programmers who write cross-OS software find UTF-16 quite inconvenient, as it cannot be handled in simple C strings. So recently Microsoft decided they could finally repurpose the Win98 compatibility APIs and added this checkbox which switches the 'ANSI' functions to use UTF-8 instead of Windows-125x. However, this does nothing to the 'Unicode' functions which remain UTF-16 as before.

So the problem isn't that Windows switched from UTF-8 to UTF-16; that has never been the case. The problem – if the GitHub thread is correct – is that the program in question appears to be compiled to use the 'ANSI' APIs (which had never been Unicode-compatible at all in the past), and Windows switched those from CP1252 to UTF-8.

To fix it – as the user "AZeroEight" writes:

There is a checkbox for Beta UTF-8 support which was checked on the new system - unchecking and restarting Barrier solved the issue for me.