Opened 15 years ago

Closed 15 years ago

Last modified 13 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 by felix winkelmann, 15 years ago

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

comment:2 by felix winkelmann, 15 years ago

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

comment:3 by Alaric Snell-Pym, 15 years ago

Resolution: fixed
Status: newclosed

Much better, thanks!

comment:4 by felix winkelmann, 15 years ago

Milestone: 4.7.04.8.0

Milestone 4.7.0 deleted

comment:5 by felix winkelmann, 13 years ago

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.