on-internet
← Community

How do you set strings to uppercase / lowercase in Unicode?

Stack Overflow ·

This is mostly a theoretical question I'm just very curious about. (I'm not trying to do this by coding it myself or anything, I'm not reinventing wheels.) My question is how the uppercase/lowercase table of equivalence works for Unicode. For example, if I had to do this in ASCII, I'd take a character, and if it falls withing the [a-z] range, I'd sum the difference between A and a. If it doesn't fall on that range, I'd have a small equivalence table for the 10 or so accented characters plus ñ. (Or, I could just have a full equivalence array with 256 entries, most of which would be the same as

Comments

Sign in or sign up to comment and upvote.

No comments yet.