This detects when the Windows Terminal uses codepage 65001
(a.k.a. "UTF-8") for output, and sets the default host
charset to UTF-8 in that case. It also enables Emoji
styling, as the Windows terminal supports it in that case.
* gdb/charset.c (INIT_GDB_FILE) [USE_WIN32API]: If the Windows
console uses codepage 65001, set default host charset to UTF-8, and
switch to the "C" locale, to prevent Windows from interpreting UTF-8
sequences written to the console.
* gdb/mingw-hdep.c (windows_initialize_console): Don't disable Emoji
here...
* gdb/charset.c (INIT_GDB_FILE) [USE_WIN32API]: ...disable them here
instead, and only if the console doesn't use UTF-8.