Name: dfR10049 Date: 12/06/2000
Javadoc for java.net.URLEncode.encode(String s, String enc) states:
Parameters:
s - String to be translated.
enc - The name of a supported character encoding. A value of null will result in
UTF-8.
Throws:
UnsupportedEncodingException - If the named encoding is not supported
Spec for character encoding states that:
The empty string is not a legal encoding name.
But in the current implementation an empty encoding name treats as UTF-8.
src/java/net/URLEncoder.java:
public static String encode(String s, String enc)
throws UnsupportedEncodingException {
...
if ( (enc == null) || (enc.length() == 0))
enc = "UTF-8";
}
Implementation should be fixed to be consistent with spec or this behavior should
be reflected in Javadoc.
======================================================================
Name: dfR10049 Date: 12/07/2000
The same words are acceptable for java.net.URLDecoder class
======================================================================