@dalias indeed, Unicode does carefully specify its own rule for translating between upper and lower case, which will tell you when there's no such mapping available, and also work correctly when there is one but it doesn't follow the 'xor with 0x20' rule.
(Fun fact: the 'xor with 0x20' rule works for half the Greek alphabet but not the other half, because the two cases of Greek are separated by 0x20 but offset by 0x10. E.g. the xor rule maps Γ to γ as you'd like, but Σ and σ each map to an unrelated thing.)
But if I'd used the proper Unicode case mapping rules then the joke wouldn't have worked :-)