Force encoding when using String.toLower/UpperCase, close #361