-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
8, 9
-
generic
-
generic
A DESCRIPTION OF THE REQUEST :
I suggest to add
java.net.URLEncoder.encode(String, Charset)
java.net.URLEncoder.decode(String, Charset)
methods.
JUSTIFICATION :
For a developer it's more convenient to write:
URLEncoder.encode("abc", StandardCharsets.UTF_8)
rather than:
try {
URLEncoder.encode("abc", "utf-8");
} catch (UnsupportedEncodingException e) {
// should never happen anyway.
}
I suggest to add
java.net.URLEncoder.encode(String, Charset)
java.net.URLEncoder.decode(String, Charset)
methods.
JUSTIFICATION :
For a developer it's more convenient to write:
URLEncoder.encode("abc", StandardCharsets.UTF_8)
rather than:
try {
URLEncoder.encode("abc", "utf-8");
} catch (UnsupportedEncodingException e) {
// should never happen anyway.
}
- duplicates
-
JDK-8178704 Add Charset overloads to URLDecoder and URLEncoder
-
- Closed
-