// optimize for the common case where the string is all ASCII characters
for (int i=url.length()-1; i>=0; i--) {
char ch = url.charAt(i);
if (ch<32 || ch>126) {
if (normalize) {
CharSequence normalized = new Normalizer(Normalizer.C, config).normalize(url);
return reallyEscapeURL(normalized);
} else {
return reallyEscapeURL(url);
}
}