src/jdk/nashorn/internal/runtime/GlobalFunctions.java

Print this page

        

@@ -28,10 +28,11 @@
 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,14 +372,14 @@
             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());
+                sb.append(Integer.toHexString(b & 0xFF).toUpperCase(Locale.ENGLISH));
             } else {
                 sb.append("%u");
-                sb.append(Integer.toHexString(ch & 0xFFFF).toUpperCase());
+                sb.append(Integer.toHexString(ch & 0xFFFF).toUpperCase(Locale.ENGLISH));
             }
         }
 
         return sb.toString();
     }