JDK-4884238 : (cs) Constants for Character Set Names
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2003-06-26
  • Updated: 2017-05-16
  • Resolved: 2011-07-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b142Fixed
Related Reports
Relates :  
Relates :  
Description
Name: rmT116609			Date: 06/25/2003


A DESCRIPTION OF THE REQUEST :
Feature Request to add constants for commonly used character sets such as UTF-8. These constants do not appear to be specified in any class, yet are required to be specified as Strings in many methods, such as URLEncoder.encode(), InputStreamReader constructor.

JUSTIFICATION :
This is a constant string that is relied upon by parts of the Java API. The constant should therefore be embodied in the Java API.


---------- BEGIN SOURCE ----------
String encoded = URLEncoder.encode("Hello, World!", URLEncoder.UTF_8);

---------- END SOURCE ----------
(Review ID: 186679) 
======================================================================

Comments
EVALUATION After careful review and debate the vote goes to close this RFE with "will not fix".
15-11-2007

EVALUATION Even better would be to define constant charset objects for the standard charsets (e.g., java.nio.charset.Charset.ASCII, .UTF_8, etc.). This will be considered for a future release. -- ###@###.### 2003/11/4
11-11-0170