mu*index
reading
plain text
theme

protocol

CHARSET

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 — 12.9%

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.

Games observed offering CHARSET in a handshake, by the codebase we identified them as running.
codebase offered it identified
PennMUSH 28 34
FluffOS 16 28
RhostMUSH 5 40
ROM 2 55
SMAUG 1 20
AresMUSH 0 18
CircleMUD 0 47
CobraMUSH 0 2
CoffeeMUD 0 32
DikuMUD 0 35
Evennia 0 11
MUCK 0 24
tbaMUD 0 5
TinyMUSH 0 9

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 How a client tells a server what it is and what it can do — including, if the client chooses to say so, that a screen reader is in use.
  • How to connect A host, a port, and telnet. What the address on a game page means and what to do with it.
  • TinyMUX The other big MUSH server. Softcode close enough to PennMUSH's to argue about, no MSSP at all, and a pre-login WHO that works.