Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4287465
Votes 1
Synopsis RFE: Character converter Service Provider Interface (SPI) and API
Category java:char_encodings
Reported Against 1.1.4 , 1.2.1 , 1.2beta2 , 1.2beta3 , merlin-beta , kestrel-beta
Release Fixed
State 11-Closed, duplicate of 4313884, request for enhancement
Priority: 3-Medium
Related Bugs 4093056 , 4239372 , 4287466 , 4303621 , 4313884
Submit Date 03-NOV-1999
Description


Updated: nl37777                Date: 01/13/00


Characters are represented in many different ways on different platforms and in different locales. The Java platform uses Unicode as its internal character encoding, but software written in Java still needs to be able to interpret or produce text in the encodings of other software systems that it interacts with.

Releases 1.1 through 1.3 provide very limited ways to interpret or produce text in outside encodings: a few methods in the String class allow conversion between strings (encoded in Unicode) and byte arrays (encoded in some other encoding), and the InputStreamReader and OutputStreamReader classes allow text I/O in different encodings. There is no way for applications to convert text directly that's stored in data structures other than String, and the list of usable encodings is limited to those provided by a given Java runtime - there is no way add support for additional encodings. Developers have also complained about the lack of a well-defined naming scheme for Java character converters, and lack of support for IANA and MIME names.

The proposed character converter framework provides the following features:

- A character converter API which lets applications request character converters and interact with them directly; as well as obtain name information both for programmatic use (e.g., preferreed MIME name), and for display to the user. 
- A character converter Service Provider Interfacs (SPI) which allows licensees and independent software vendors to create character converters and associated name table entries that plug into any Java runtime. 
- A well-defined naming scheme for Java character converters, based as much as possible on existing standards. 
- An API that lets application determine a preferred encoding for each locale, e.g., to encode outgoing email. 

Along with the introduction of API and SPI, we'll also restructure the set of character converters that is provided by the J2RE:

- Update converter generator to generate converters for the SPI. 
- Package converters that are required for J2RE into separate platform independent and platform specific bundles: 
- National and international standards (Unicode variants, ISO 8859 series, ISO 2022, JIS 0201/0208/0212, Shift-JIS, GB 2312, etc.) 
- Encodings commonly used on the Internet (EUC, Windows 1252, Macintosh Roman, etc.) 
- Windows 
- Solaris (unless covered by Standards or Internet bundle) 
- Remove platform specific converters that are not required for J2RE ("Cp", Macintosh). We expect platform vendors to provide these converters. 
- Update remaining converters to plug into SPI. 

======================================================================
Work Around
N/A
Evaluation
Planned for Merlin.
  xxxxx@xxxxx   2000-01-26
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang