-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"out of range" error for some SRFIs #6
Comments
I'll take a look. This can happen when importing via |
I suspect this to be an issue external to chicken-doc-text, caused by the fmt egg and interaction with Unicode characters like U+2618 (☞). Some chars work fine (srfi-45 é) but others do not. The text engine relies heavily on wrapping, so perhaps the character width table is at fault. Specifically, for chars between #x0300 and #x3029, it uses the low-non-spacing-chars table to determine char width. The table (a u8vector) exactly matches the u8vector-ref error. |
With your pointers I went digging a bit, and I don't understand much of what's going on, but I found that indeed ; fmt-unicode-chicken.scm:95
((<= #x0300 ci #x3029)
(let* ((i (- ci #x0300))
(byte (quotient i 8))
(off (remainder i 8)))
(if (zero? (bitwise-and (u8vector-ref low-non-spacing-chars byte)
(arithmetic-shift 1 off)))
1
0)))
|
Yeah, the table is only valid for 0x300-0x20ef, really it needs to be capped at that point. I'm trying to regenerate the table now and fix a couple other bugs. |
I have fixed the issue in fmt-unicode but need to talk to upstream before applying. |
chicken-doc
fails with an "out of range" error when asking for some SRFIs' docs. These are the offending SRFIs:SRFI-105
SRFI-130
SRFI-135
SRFI-178
SRFI-189
SRFI-196
It seems
u8vector
s are not used directly inchicken-doc
, so the problem may be in a dependency, but I have no other clue about that...While looking for other SRFIs I noticed that SRFI-111 also fails, but with a different error (probably unrelated):
The text was updated successfully, but these errors were encountered: