(char-downcase (char-upcase (code-char 181))) returns a different character
Describe the bug
(char-downcase (char-upcase (code-char 181)))
returns a different character from (code-char 181)
.
This was reported to me by Matt Kaufmann.
To Reproduce
Steps to reproduce the behavior:
(describe (char-downcase (char-upcase (code-char 181)))
- The resulting character is #\u+3bc, Greek_Small_Letter_Mu
- This isn't the same as
(code-char 181)
, obviously
Expected behavior
Matt expected this round-trip case conversion would return the same character.
However, we use the case mapping as specified by UnicodeData.txt, which causes this issue.
Matt says of all the characters with codes from 0 to 255 (the ones he cares about), 181 is the only one that doesn't produce the same character.
Desktop (please complete the following information):
- OS: All
- Version: snapshot-2024-04 and probably much earlier to the original Unicode version.