Optimize downcase, upcase and rstrip in Unicode