#428 closed defect (fixed)
Escape control characters in printed representation of symbols
Reported by: | Alaric Snell-Pym | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.9.0 |
Component: | core libraries | Version: | 4.6.0 |
Keywords: | Cc: | ||
Estimated difficulty: |
Description
#;2> (with-output-to-string (lambda () (write (string->symbol (string-append "5" "\x00"))))) "|5\x00|"
NB: That \x00
in the output is due to the string being escaped, not the control character in the symbol being escaped.
This problem is particularly painful when one outputs the symbol direct to the terminal, where the \x00
just disappears:
#;5> (write (string->symbol "5\x00")) |5|#;6>
...and one then spends ages tearing one's hair out as to what's wrong!
Note: See
TracTickets for help on using
tickets.
I have tried to improve this, please see commit 5f17e3fcac425156b26648b7f5ffed5aef0aa458 ("experimental") and close the ticket, if it works for you.