Fix uppercase conversion for diacritics

This avoids problems like "Mönnich" being converted to "MöNNICH" when
displaying it in uppercase. Same for other characters that are not plain
ASCII.