Type | Bug | Status | tested | Date | 3-Jan-2010 13:16 |
---|---|---|---|---|---|
Version | alpha 95 | Category | Syntax | Submitted by | meijeru |
Platform | All | Severity | minor | Priority | normal |
Summary | Character literal #"^^" is ambiguous |
---|---|
Description |
The escape character ^ must itself be escaped to be represented. Thus the single character ^ (U+005E) is #"^^". However, the first 32 characters (U+0000 .. U+001F) are molded in REBOL as #"^@" #"^A" .. #"^Z" #"^[" #"^\" #"^]" #"^^" #"^_" Two different characters (U+005E and U+001E) are thus molded as #"^^". On loading, this literal is always interpreted as U+005E. Thus, to represent char 30 (U+001E) one should NOT use #"^^". |
Example code |
>> to-char 94 == #"^^" >> to char 30 == #"^^" >> to-integer #"^^" == 94 >> to-integer load mold to-char 30 == 94 |
Assigned to | n/a | Fixed in | alpha 97 | Last Update | 8-Feb-2010 03:08 |
---|
Comments | |
---|---|
(0001951)
Carl 4-Feb-2010 14:37 |
Very good description of the problem, thanks. |
(0001961)
meijeru 4-Feb-2010 18:57 |
I appreciate the compliment, but what is the solution? |
(0001994)
meijeru 7-Feb-2010 19:05 |
I have now noticed that in alpha97 to-char 30 produces #"^(1E)" in contrast to all other integers < 32, which produce #"^@" etc. This is workable. |
Date | User | Field | Action | Change |
---|---|---|---|---|
8-Feb-2010 03:08 | BrianH | Status | Modified | built => tested |
7-Feb-2010 19:05 | meijeru | Comment : 0001994 | Modified | - |
7-Feb-2010 19:05 | meijeru | Comment : 0001994 | Added | - |
4-Feb-2010 18:57 | meijeru | Comment : 0001961 | Added | - |
4-Feb-2010 14:38 | carl | Fixedin | Modified | => alpha 97 |
4-Feb-2010 14:38 | carl | Status | Modified | reviewed => built |
4-Feb-2010 14:37 | carl | Comment : 0001951 | Added | - |
12-Jan-2010 21:05 | carl | Description | Modified | - |
12-Jan-2010 21:05 | carl | Code | Modified | - |
12-Jan-2010 21:05 | carl | Status | Modified | submitted => reviewed |
3-Jan-2010 13:16 | meijeru | Ticket | Added | - |