string-downcase does not downcase character 224
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The CL HyperSpec says (https:/
* (char-code (char-downcase (code-char 192)))
224
* (let ((s (string-downcase (coerce (list (code-char 192)) 'string))))
(char-code (char s 0)))
192
*
Interestingly, going in the other direction (using string-upcase) works as expected.
* (let ((s (string-upcase (coerce (list (code-char 224)) 'string))))
(char-code (char s 0)))
192
*
Apparently (code-char 224) is the only standard character with this problem.
* (loop for i from 0 to 255
as c = (code-char i)
when (and (lower-case-p c)
collect i)
(224)
*
I got the results above on MacOS using the latest SBCL:
~$ uname -a
Darwin Matts-MacBook-
~$ sbcl --version
SBCL 2.4.5
~$
* *features*
(:ARENA-
:IEEE-
:SB-
*
On Linux I used the preceding SBCL version:
cyan:~% uname -a
Linux cyan 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
cyan:~% sbcl --version
SBCL 2.4.4
cyan:~%
* *features*
(:ARENA-
:IEEE-
:SB-
*
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |