Raymond Toy writes:
>>>>>>"Vadim" == Vadim V Zhytnikov <vvzhy@mail.ru> writes:
>>>>>>
>
> Vadim> But isn't
>
> Vadim> (typep "12" '(simple-base-string 2)) -> NIL
>
> Vadim> wrong? CLISP, GCL and CLISP (with Unicode support
> Vadim> as well) all agree that this is T.
>
>I think it depends on the external format being used to read the
>entire form in. I'm not very familiar with unicode.
>
>Ray
>
>
>
>
>
Ok. But just take a look at this sbcl 0.8.17 session:
================================================================
This is SBCL 0.8.17, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (typep "12" '(simple-base-string 2))
NIL
* (typep "12" '(simple-string 2))
T
* (typep #\1 'base-char)
T
* (char-code #\1)
49
* (char-code (aref "12" 0))
49
* (typep (aref "12" 0) 'base-char)
T
*
=================================================================
Since (simple-base-string 2) is equivalent to (simple-array base-char (2))
the first result seems to be wrong (BTW, my locale is not Unicode if
this matters).
Best wishes,
Vadim
--
Vadim V. Zhytnikov
<vvzhy@mail.ru>
<vvzhy@netorn.ru>