[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] utf8 egg and byte-* procedures
From: |
Jeronimo Pellegrini |
Subject: |
Re: [Chicken-users] utf8 egg and byte-* procedures |
Date: |
Thu, 25 Mar 2010 18:56:18 -0300 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Thu, Mar 25, 2010 at 04:26:32PM -0400, Mario Domenech Goulart wrote:
> Hi Jeronimo
Hi Mario!
> On Thu, 25 Mar 2010 14:20:43 -0300 Jeronimo Pellegrini <address@hidden> wrote:
>
> > I have checked the egg source and indeed, the redefinitions are
> > there (this is from utf8.scm):
> >
> > (import (rename (except scheme
> > string string->list list->string string-fill!
> > string-ref string-set! write-char read-char)
> > (make-string make-byte-string)
> > (substring byte-substring)
> > (string-length byte-string-length) ;; <=== !!!
> >
> > Is there something else I have to do in order to have access to the
> > old procedures?
>
> Actually, as far as I can see, the renaming is for importing, not for
> exporting. utf8 doesn't export `byte-string-length'. So, if you want
> `byte-string-length' available as the old `string-length', you can pick
> it from scheme:
>
> (import utf8)
> (import (rename scheme (string-length byte-string-length)))
I'm a bit confused... From the documentation it seemed that the older
procedures were jsut renamed for convenience.
Anyway, I tried what you suggested but it didn't work:
#;1> (import utf8)
...
#;2> (import (rename scheme (string-length byte-string-length)))
Warning: re-importing already imported identifier: write-char
Warning: re-importing already imported identifier: display
Warning: re-importing already imported identifier: read-char
Warning: re-importing already imported identifier: string
Warning: re-importing already imported identifier: string-fill!
Warning: re-importing already imported identifier: substring
Warning: re-importing already imported identifier: list->string
Warning: re-importing already imported identifier: string->list
Warning: re-importing already imported identifier: string-set!
Warning: re-importing already imported identifier: string-ref
Warning: re-importing already imported identifier: make-string
#;3> (byte-string-length "áé")
4
#;4> (string-length "áé")
Error: unbound variable: utf8#string-length
Call history:
<syntax> (string-length "áé")
<eval> (string-length "áé") <--
#;4>
Not sure what todo...
J.