src/jdk/nashorn/internal/runtime/GlobalFunctions.java
Print this page
*** 28,37 ****
--- 28,38 ----
import static jdk.nashorn.internal.runtime.JSType.digit;
import static jdk.nashorn.internal.lookup.Lookup.MH;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
+ import java.util.Locale;
/**
* Utilities used by Global class.
*
* These are actual implementation methods for functions exposed by global
*** 371,384 ****
if (UNESCAPED.indexOf(ch) != -1) {
sb.append(ch);
} else if (ch < 256) {
sb.append('%');
final byte b = (byte)ch;
! sb.append(Integer.toHexString(b & 0xFF).toUpperCase());
} else {
sb.append("%u");
! sb.append(Integer.toHexString(ch & 0xFFFF).toUpperCase());
}
}
return sb.toString();
}
--- 372,385 ----
if (UNESCAPED.indexOf(ch) != -1) {
sb.append(ch);
} else if (ch < 256) {
sb.append('%');
final byte b = (byte)ch;
! sb.append(Integer.toHexString(b & 0xFF).toUpperCase(Locale.ENGLISH));
} else {
sb.append("%u");
! sb.append(Integer.toHexString(ch & 0xFFFF).toUpperCase(Locale.ENGLISH));
}
}
return sb.toString();
}