CHARSET [protocol]
RFC 2066's telnet option for agreeing an encoding. The reason a game's accented
names survive the trip, and the source of some subtle failures when it is
absent.
https://www.rfc-editor.org/rfc/rfc2066
Measured adoption
114 of 886 listed games were observed offering it (12.9%)
/games?protocol=CHARSET
The games not counted here are not games without the protocol. A game is
counted when we observed its server offering the option in a handshake; the
rest are servers that did not offer it to us and servers whose handshake we
have not read, and we cannot tell you which.
By codebase, of the games we identified
PennMUSH 28 of 34 offered it
FluffOS 16 of 28 offered it
RhostMUSH 5 of 40 offered it
ROM 2 of 55 offered it
SMAUG 1 of 20 offered it
AresMUSH 0 of 18 offered it
CircleMUD 0 of 47 offered it
CobraMUSH 0 of 2 offered it
CoffeeMUD 0 of 32 offered it
DikuMUD 0 of 35 offered it
Evennia 0 of 11 offered it
MUCK 0 of 24 offered it
tbaMUD 0 of 5 offered it
TinyMUSH 0 of 9 offered it
CHARSET is telnet option 42, specified in RFC 2066. One side offers a list of
character sets, the other picks one, and both then agree on how bytes map to
characters.
In practice the negotiation settles on UTF-8 or is not held at all. The MUSH
family negotiates it noticeably more than the MUD family — TinyMUX, RhostMUSH
and PennMUSH all do — which reflects a population that writes prose with names
in it.
WHAT HAPPENS WITHOUT IT
A client has to guess, and the usual guess is either ASCII or Latin-1. Guess
ASCII and every byte above 0x7F becomes a question mark; guess Latin-1 on a
UTF-8 server and every accented character becomes two pieces of punctuation.
Both failures look like the game's fault and are not.
For a crawler this bites in a specific place. Our own telnet library defaults
its current encoding to ASCII, and that default is not inert — it is what every
byte is decoded with, for every server that never negotiates CHARSET, which is
most of them. We seed it deliberately for that reason.
THE ONE PLACE CHARSET DOES NOT REACH
MSSP field names and values are decoded as ASCII regardless of what CHARSET
settled on, because a subnegotiation is a command rather than text and the
specification scopes CHARSET to text. That is arguably conformant and it is
lossy: a game whose MSSP NAME is Café Noir reports Caf? Noir, and the original
bytes are gone before anything we control sees them.
If you see a mangled character in a declared field on this site and not in the
game's own output, that is why, and it is not recoverable from our side.
See also
TTYPE and MTTS — /reference/protocols/ttype
How to connect — /reference/connecting
TinyMUX — /reference/codebases/tinymux