I think the problem is that the routine in question is fundamentally written to assume a signed input. Perhaps there should be an unsigned version that takes unsigned chars, and perhaps guile should explicit declare characters as one or the other. Or perhaps just always cast to unsigned char - if it is already unsiged that is a no-op.