this is overly naive, and even does not work with EBCDIC implement a proper unicode upcase and lowercase converter (with various tables. see musl, not glibc) seperate from the encoding. (UTF-8, wchar, UCS-16, UCS-32)