Jan Egil Hagen <·····@nntp.ifi.uio.no> writes:
> I am confused about the behavior of code-char and char-code.
> According to the HyperSpec, (code-char (char-code c)) is supposed to
> return c. But Allegro CL Trial Edition 5.0 behaves like this:
Hmmm, not having verified this in the CLHS, I'd think that it only
states that the result of (code-char (char-code c)) is supposed to
return something eql to c, and not necessarily c itself (see 13.1.5,
where it states that two characters being eql don't have to be eq,
i.e. identical objects).
> (code-char (char-code #\newline))
> => #\newline
> (code-char (char-code #\ø))
> => #\%x
But also:
(eql #\ø #\%x)
=> T
So ACL is not in violation of the Spec, wrt. to code-char and char-code.
It just seems to me that with default settings the ACL printer chooses a
7bit representation of 8bit characters for printing, where #\%x and #\ø
denote the same character. But to be certain about that, I'd consult
the documentation of ACL, where I would expect to find information about
this.
Regs, Pierre.
--
Pierre Mai <····@acm.org> PGP and GPG keys at your nearest Keyserver
"One smaller motivation which, in part, stems from altruism is Microsoft-
bashing." [Microsoft memo, see http://www.opensource.org/halloween1.html]