Raymond Toy pushed to branch issue-316-support-roundtrip-char-casing at cmucl / cmucl
Commits: 3a0f81e8 by Raymond Toy at 2024-05-13T14:23:47-07:00 Ignore some categories when finding the upper or lower case character
For `unicode-upper`, we ignore characters with the category Lt, Mn, Nl, and So and just return the character unchanged. Likewise, for `unicode-lower`, we ignore Lt, Nl, and So.
- - - - - 7f4f1e75 by Raymond Toy at 2024-05-13T14:25:22-07:00 Checkout the correct branch for the ansi-test code.
- - - - -
2 changed files:
- bin/run-ansi-tests.sh - src/code/unidata.lisp
Changes:
===================================== bin/run-ansi-tests.sh ===================================== @@ -41,7 +41,7 @@ else fi
cd ../ansi-test -git checkout issue-288-new-failures +git checkout issue-316-support-roundtrip-char-casing
make LISP="$LISP batch -noinit -nositeinit" # There should be no unexpected successes or failures; check these separately
===================================== src/code/unidata.lisp ===================================== @@ -883,7 +883,9 @@ (unless (unidata-scase *unicode-data*) (load-scase)) (let* ((scase (unidata-scase *unicode-data*)) (n (logand (qref32 scase code) #xFF))) - (if (zerop n) + (if (or (zerop n) + ;; Ignore category Lt, Mn, Nl, So + (member (unicode-category code) '(92 32 75 109))) code (let* ((m (aref (scase-svec scase) (logand n #x7F)))) (if (logbitp 7 n) (+ code m) (- code m)))))) @@ -894,7 +896,9 @@ (unless (unidata-scase *unicode-data*) (load-scase)) (let* ((scase (unidata-scase *unicode-data*)) (n (logand (ash (qref32 scase code) -8) #xFF))) - (if (zerop n) + (if (or (zerop n) + ;; Ignore category Lt, Nl, So + (member (unicode-category code) '(92 75 109))) code (let ((m (aref (scase-svec scase) (logand n #x7F)))) (if (logbitp 7 n) (+ code m) (- code m))))))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/9d3452f1b14c8f6ab488fc3...