On Wed, Apr 15, 2009 at 02:09:12PM +0200, [email protected] wrote: > FWIW, I traced the problem to http-server. Even the simple example on > the wiki breaks when utf8 is loaded. I will look deeper into this > tonight (at work right now...), but I mention this in case anyone is > reading along and wants to look at it.
The problem is in UTF8's string-search-positions procedure: #;1> (use regex) ; loading library regex ... #;2> (string-search-positions "a" "b" 0) #f #;3> (use utf8) ; loading /usr/pkg/lib/chicken/3/utf8.scm ... ; loading /usr/pkg/lib/chicken/3/utf8-support.so ... ; loading /usr/pkg/lib/chicken/3/utf8-lolevel.so ... ; loading /usr/pkg/lib/chicken/3/byte-string.so ... #;4> (string-search-positions "a" "b" 0) ((-1 -1)) It's the -1 that's unexpected, since it's not a valid string index, so trying to do anything with that causes it to fail big time. It should just return #f on non-matching stuff. Still not sure what exactly causes this, though. Cheers, Peter -- http://sjamaan.ath.cx -- "The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music." -- Donald Knuth
pgpQSxRwSlHbU.pgp
Description: PGP signature
_______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
