Hello i wanted to be able to detect as much information as possible about the client connecting to my server.
I'am already doing TTYPE and NAWS and that helps a lot. But what is the best way for:
See if the client supports ANSI color 16 or 256 See if the client supports UTF-8
My MUD will use formatting characters like the block and half-block so i need UTF-8 or CP437… I wanted to see if i could use "??????" (block and half-block characters) so i can properly present the start screen (on connect) that uses them.
It's reasonably safe to assume that clients support basic ANSI colour, it's been many years since I encountered one that didn't. XTerm 256 colour is more tricky, and requires a mixture of techniques, which I described here and included in my snippet here.
UTF-8 can be identified using CHARSET, and that is included in my snippet as well.
Using such features in the login screen will require you to pause for a moment to negotiate before the user can log on. This may interfere with autologin scripts.
FMud and Atlantis certainly support CHARSET. MUSHclient supports it, but you have to manually check the UTF-8 box within the client settings. TinTin++ apparently supports it through a #config option, but I've not tested it. BlowTorch was going to add it, but I don't believe they ever finished doing so. I'd speculate a few other clients support it as well, but overall you're right, it's not widely used.