read/write invariance problem with symbols
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Released
|
Medium
|
Abdulaziz Ghuloum |
Bug Description
[d@eep:~]-> ikarus
Ikarus Scheme version 0.0.1
Copyright (c) 2006-2007 Abdulaziz Ghuloum
> '|a b|
a\x20;b
> 'a\x20;b
Unhandled exception
Condition components:
1. &error
2. &who: tokenize
3. &message: "invalid identifier syntax"
4. &irritants: ("a\\")
> (let ([os (open-output-
(write '|a b| os)
(read (open-input-string (get-output-string os))))
Unhandled exception
Condition components:
1. &error
2. &who: tokenize
3. &message: "invalid identifier syntax"
4. &irritants: ("a\\")
> (string->symbol (symbol->string '|a b|))
a\x20;b
> (let ([os (open-output-
(write (string->symbol "a b") os)
(read (open-input-string (get-output-string os))))
Unhandled exception
Condition components:
1. &error
2. &who: tokenize
3. &message: "invalid identifier syntax"
4. &irritants: ("a\\")
> (string->symbol "a b")
a\x20;b
> (symbol->string 'a\x20;b)
Unhandled exception
Condition components:
1. &error
2. &who: tokenize
3. &message: "invalid identifier syntax"
4. &irritants: ("a\\")
;; but if they start with \xXX; they work
> '\xa;b
\xA;b
> '\x20;zzz
\x20;zzz
Changed in ikarus: | |
assignee: | nobody → aghuloum |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in ikarus: | |
status: | Fix Committed → Fix Released |
Fixed in revision 1085.
Ikarus Scheme version 0.0.1
Copyright (c) 2006-2007 Abdulaziz Ghuloum
> '|a b| string) ]) string) ])
a\x20;b
> 'a\x20;b
a\x20;b
(let ([os (open-output-
(write '|a b| os)
(read (open-input-string (get-output-string os))))
a\x20;b
> (string->symbol (symbol->string '|a b|))
a\x20;b
(let ([os (open-output-
(write (string->symbol "a b") os)
(read (open-input-string (get-output-string os))))
a\x20;b
> (string->symbol "a b")
a\x20;b
> (symbol->string 'a\x20;b)
"a b"
> '\xa;b
\xA;b
> '\x20;zzz
\x20;zzz
>