Incorporate part of <Someone>'s changes to address
the main part of bug W343-3.
One other patch yet to come needs to provide a way
to limit the IBMGraphics symbols to various subsets that are
available on some international versions of Windows. Pat
suggested that we not incorporate that patch as is, so I'll be
working on an overhaul of the {DEC|IBM|MACgraphics mechanism.
* Checks for the presence of the Unicode
APIs. If GetVersion() returns the 31st bit set, NetHack is running on
a 95-based version of Windows. The Unicode APIs are not available
and NetHack will revert to the pre-patch behavior. This fix isn't needed
on 95-based Windows anyway.
* Fixes console output for text strings.
The character is converted according to the user's configured IEM code
page and passed to the Unicode version of WriteConsoleOutputCharacter.
* Fixes console output for map symbols.
The character is converted according to a fixed mapping containing
code page 437 plus the symbols in the space from 00 to 1F. A fixed
table is used so that a player using Lucida Console can get full
IBMgraphics (original set, i.e. level 3) regardless of the code page.
A table is used instead of MultiByteToWideChar so that the space from
00 to 1F will be converted correctly; this is necessary for correct
display of the Rogue level.