UnNetHack enters the Age of Unicode – Part Two (UTF8graphics)
UnNetHack has a new option “UTF8graphics” for outputting UTF-8 encoded characters onto the terminal. Currently only dungeon features (walls, fountains, altars, etc.) are supported although I think it shouldn’t be too difficult to extend this to all things that are displayed on the map.
Here is a list of the dungeon features that are enhanced in UTF8graphics:
Altar: Ω Grave: † Lava: ◆ Tree: Ψ Water: ≈ Fountain: ¶ Iron bars: Π Open doors: ▒ Ladder up/down: ≤ ≥
The floor and the walls use the usual line drawing characters already familiar to the players from IBMgraphics and DECgraphics.
Sinks and thrones currently lack Unicode characters but ideas for those and for general improvements is of course welcome.
I didn’t bother to update the Rogue level characters. That level will still only appear in simple ASCII (after seeing what they had to do with IBMgraphics to make it look different, I rather postponed doing that for UTF8graphics yet).
For monsters there’s already the interesting work Ray Chason did a while back: Unicode map revisited: Proposed monster accents. I will certainly consider this when changing the monster characters from ASCII to Unicode.
But be aware that the current implementation is restricted to single code points. That means no combining characters or other fancy Unicode feature are possible at the moment.
For a fully enabled UTF-8 UnNetHack there is still a lot to do (don’t expect a release date soon). For example the whole text handling would have to be checked or also the GRAPHICS option would need to be rewritten to allow the user to specify Unicode code points. Currently the users have to be content with the hard coded defaults.
As usual this feature is already available on the public server and will be part of the next release of UnNetHack.
Update 04 Feb 2011
The default glyphs for lava(≋), water(≋) and iron bars(≡) have been changed.
The UTF8graphics glyphs are now customizable in the config file, by specifying the name from the
/ command and the Unicode codepoint in decimal or hexadecimal notation:
SYMBOL='opulent throne':u+2644 # astronomical symbol for Saturn SYMBOL='fountain':0x2648 # astronomical symbol for Aries SYMBOL='molten lava':9671 # white diamond