sheredom / utf8.h

📚 single header utf8 string functions for C and C++
The Unlicense
1.71k stars 122 forks source link

tolower and toupper? #25

Closed codecat closed 8 years ago

codecat commented 8 years ago

How does this work with utf8?

I can use tolower() and toupper() to get lowercase or uppercase characters of ascii chars, but there's nothing in this library for converting codepoints, from what I see.

sheredom commented 8 years ago

So @angelog do you basically want utf8 variants of tolower() and toupper(), from the header? Any of the other functions useful too?

codecat commented 8 years ago

Hm, not sure about other functions, but those are a few I particularly need. Perhaps functions like isupper, islower too.

codecat commented 8 years ago

I looked into this a bit, seems like it'll be difficult to support it properly. With that I mean, apparently things like ß in uppercase is SS and there's a lot more edge cases like that.

What a toupper and tolower could do as a bare minimum is handle ascii upper and lower case, but handling every usecase probably isn't maintainable.

sheredom commented 8 years ago

Thanks!