From NetHackWiki
Jump to: navigation, search

I've tried again to contact the DevTeam about this bug. Watch this space for any further developments. -- Ray Chason 02:18, 27 August 2006 (UTC)

I've heard back from Michael Allison, giving some suggestions. That said, at this writing, W343-3 is still tagged Help. -- Ray Chason 18:30, 9 September 2006 (UTC)

Existing locales patch perhaps not adequate

While testing Windows 8 for this bug (and finding it), I noticed another bug. When Lucida Console or Consolas is configured, W343-3 does not occur (as expected); but the codes 0x00 through 0x1F map to incorrect characters. This new bug occurs also when English is configured.

This bug needs further investigation, including a test on Windows 7. The test program linked at the bottom of the article uses MultiByteToWideChar to convert the 8-bit code to Unicode, and so does the locales patch. Perhaps a fixed table needs to be used instead.

The expected manifestation is that, when a TrueType font is configured and the locales patch is in use, normal dungeons will appear correctly, but the Rogue level will show the characters ☺ ♦ ♣ ♀ ♫ ☼ ↑ incorrectly.--Ray Chason (talk) 05:14, 13 September 2013 (UTC)

A quick test shows that MultiByteToWideChar maps codes 0x00-0x1F to U+0000-U+001F. I guess I should have expected that. The right fix is probably to use a fixed table for these codes and MultiByteToWideChar for the rest.--Ray Chason (talk) 05:21, 13 September 2013 (UTC)
The correct fix is to pass MB_USEGLYPHCHARS to MultiByteToWideChar. I have submitted an updated locales patch that has this flag.--Ray Chason (talk) 03:48, 13 October 2013 (UTC)