I'm not sure how to express the character \x04 in lisp. On one hand, it seems kind of arbitrary, so I could in theory replace it with something else, but on the other hand I want to maintain consistency. So how do I express it?

This returns the character with the hexadecimal ASCII code #x4 (EoT), what is the same as the character with the decimal ASCII code 4 (EoT), but not the same as the ASCII character #\4 (the number 4).

Note that in most Common Lisp implementations (code-char #x04) returns a character #\EoT or similar, but the #\EoT is implementation dependent, so it's better to write (code-char #x04) and let the Common Lisp implementation decide about the internal representation.