Summary
Escape control characters in printed representation of symbols
Metadata
- Id: 8965c5b0e9c5fdcdf2960b94620e9f542bf39e0e
- Trac id: 428
- Type: defect
- Reporter: alaric
- Owner:
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty:
- Resolution: fixed
- Priority: minor
- Milestone: 4.9.0
- Version: 4.6.0
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2010-11-07 00:03:53 UTC
- Keywords:
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!
Changes and comments
[2010-11-08 11:33:26 UTC] felix wrote:
I have tried to improve this, please see commit 5f17e3fcac425156b26648b7f5ffed5aef0aa458 ("experimental") and close the ticket, if it works for you.
[2010-12-11 13:28:33 UTC] felix wrote:
Please close the ticket, if the current solution works for you.
[2011-02-05 16:21:07 UTC] alaric changed status from new to closed
[2011-02-05 16:21:07 UTC] alaric set resolution to fixed
[2011-02-05 16:21:07 UTC] alaric wrote:
Much better, thanks!
[2011-06-01 09:00:41 UTC] felix changed milestone from 4.7.0 to 4.8.0
[2011-06-01 09:00:41 UTC] felix wrote:
Milestone 4.7.0 deleted
[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted