Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#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!

Change History (5)

comment:1 Changed 13 years ago by felix winkelmann

I have tried to improve this, please see commit 5f17e3fcac425156b26648b7f5ffed5aef0aa458 ("experimental") and close the ticket, if it works for you.

comment:2 Changed 13 years ago by felix winkelmann

Please close the ticket, if the current solution works for you.

comment:3 Changed 13 years ago by Alaric Snell-Pym

Resolution: fixed
Status: newclosed

Much better, thanks!

comment:4 Changed 13 years ago by felix winkelmann

Milestone: 4.7.04.8.0

Milestone 4.7.0 deleted

comment:5 Changed 12 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.