A DESCRIPTION OF THE REQUEST :
java.lang.String.getBytes() (and all other methods in Java which rely on the platform default encoding) should be deprecated.
Instead the user should use java.lang.String.getBytes(String) at which point he can no longer avoid reading up on and understanding character sets and encodings.
JUSTIFICATION :
java.lang.String.getBytes() allows people to ignore and remain unaware of character sets and encodings. These people are the most likely to then having to invest vast effort to find the resulting bugs.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Java's standard API should not allow to rely on the default encoding anywhere in this fashion.
ACTUAL -
Java's standard API allows to rely on the default encoding in this fashion.
CUSTOMER SUBMITTED WORKAROUND :
Use of java.lang.String.getBytes(String).
java.lang.String.getBytes() (and all other methods in Java which rely on the platform default encoding) should be deprecated.
Instead the user should use java.lang.String.getBytes(String) at which point he can no longer avoid reading up on and understanding character sets and encodings.
JUSTIFICATION :
java.lang.String.getBytes() allows people to ignore and remain unaware of character sets and encodings. These people are the most likely to then having to invest vast effort to find the resulting bugs.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Java's standard API should not allow to rely on the default encoding anywhere in this fashion.
ACTUAL -
Java's standard API allows to rely on the default encoding in this fashion.
CUSTOMER SUBMITTED WORKAROUND :
Use of java.lang.String.getBytes(String).