Encoding of characters into digital data streams is rather older than Apollo. Émile Baudot's system was patented in 1874, about the time when Jules Verne was writing of the US sending a ship to the moon in the immediate postbellum period.
The USB communication system used for the Apollo mission integrated a bunch of different data and analog streams. Digital commands were encoded with many extra bits so that errors would be detected with a probability of erroneous decoding of \$ \lt 10^{-9}\$. Redundancy and fail-over modes of operation were strong concerns.
Here, for example, from this document is the LEM (Lunar Excursion Module) down link summary:

Terrestrial communication (to remote base stations) used Western Electric 2400 baud modems.
There is quite a bit of fascinating information in that overview document, including a brief description of the console displays which used special data display CRTs with both magnetic and electrostatic deflection (the latter for vector character generation).