FORMAT-OP-C
Presumably the authors intended the `cultural compatibility' part to gloss issues like how the SAIL character set printed, but unfortunately another completely reasonable (albeit unplanned) interpretation arose: some implementations have (FORMAT NIL "~C" #\Space) => "Space" rather than " ".
Since the behavior of ~A is also vague on characters (a separate proposal will address this), the only way to safely output a literal character is to WRITE-CHAR; currently, FORMAT does not suffice.
WRITE-CHAR. (This proposal leaves the behavior of ~C with non-zero bits incompletely specified.) For example, the description of the ~C format directive on p389 of CLTL might read:
~C prints the character using WRITE-CHAR if it has zero bits. Characters with bits are not necessarily printed as WRITE-CHAR would do, but are displayed in an implementation-dependent abbreviated format that is culturally compatible with the host environment.
EQUAL (FORMAT NIL "~C" #\Space) " ")It makes things clear enough that programmers can know what to expect in the normal case (standard characters with zero bits).
Users can use (FORMAT NIL "~:C" #\Space) to get "Space" if they want it. It seems as if the implementations which return "Space" treat ~C and ~:C equivalently or very similarly.
Implementations are divided. Some implementations have
(FORMAT NIL "~C" #\Space) => "Space".
Others have the same form return " ".
WRITE-CHAR would require an incompatible change.
~C and ~:C would perform usefully distinct operations.
:C" semi-automatically should suffice.
The original version of this proposal (which tried to make WRITE-CHAR and ~C identical in all cases) prompted the following comment:
"I believe the error in CLtL is that it was not stated explicitly that the `implementation-dependent abbreviated format' applies only to characters with non-zero char-bits. Thus instead of removing the mumbling about cultural compatibility, I suggest simply adding a sentence saying that ~C is the same as WRITE-CHAR for characters with zero char-bits. I don't think we want to require ~C and write-char to do the same thing for characters with bits."