Raymond Toy pushed to branch issue-316-support-roundtrip-char-casing at cmucl / cmucl
Commits: 834b3092 by Raymond Toy at 2024-05-16T16:48:00-07:00 Update string-upcase/downcase to match char-upcase/downcase
Because char-upcase/downcase changed, we need to update string-upcase/downcase to match what the functions do.
- - - - -
1 changed file:
- src/code/string.lisp
Changes:
===================================== src/code/string.lisp ===================================== @@ -642,9 +642,13 @@ (when wide (incf index)) ;; Handle ASCII specially because this is called early in ;; initialization, before unidata is available. + #+nil (cond ((< 96 code 123) (decf code 32)) #+unicode ((> code 127) (setq code (unicode-upper code)))) + (if wide + (setq code (unicode-upper code)) + (setf code (char-code (char-upcase (code-char code))))) ;;@@ WARNING: this may, in theory, need to extend newstring ;; but that never actually occurs as of Unicode 5.1.0, ;; so I'm just going to ignore it for now... @@ -684,8 +688,12 @@ (when wide (incf index)) ;; Handle ASCII specially because this is called early in ;; initialization, before unidata is available. + #+nil (cond ((< 64 code 91) (incf code 32)) ((> code 127) (setq code (unicode-lower code)))) + (if wide + (setq code (unicode-lower code)) + (setq code (char-code (char-downcase (code-char code))))) ;;@@ WARNING: this may, in theory, need to extend newstring ;; but that never actually occurs as of Unicode 5.1.0, ;; so I'm just going to ignore it for now...
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/834b3092d9e2f122f1b858c6...