Backported single character uppercase function from part 2