JDK-4126141 : RFE: Add method to query encodings available on platform
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1998-04-06
  • Updated: 2001-07-16
  • Resolved: 2001-07-16
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description

Name: rm29839			Date: 04/06/98


Currently there is no way to discover at runtime
what encodings are available when running the jvm.
This is a request for enhancement that would allow
you to programmatically query to discover what
encodings are available. This pertains to the
character encoding such as the String that
is part of the constructor for OutputStreamWriter,
as in:
public OutputStreamWriter(OutputStream out
  String enc) throws UnsupportedEncodingException

I realize you can always try a particular 
encoding as a String and wait for the 
UnsupportedEncodingException. However, this does
nothing for you in case you want to, for example,
present the user at runtime a list of all available
encodings.

Thanks,
Jon Steelman
steelman "at" mindspring.com
(Review ID: 27139)
======================================================================

Comments
EVALUATION Since encodings are also used by java.lang.String, perhaps the best place for this feature is in java.lang.System, e.g., String[] getAvailableEncodings(). -- mr@eng 4/6/1998 This should be addressed as part of RFE 4287465. Leaving this RFE open though since it provides more detail. norbert.lindenberg@Eng 2000-02-25
06-04-1998