How To Add UTF-7 Encoding To Sun JDK?
We are using Sun JDK 1.3.1, and our customers required us to support UTF-7 encoding in our system.
We tried to add a class named "ByteToCharUTF7" and set java property "file.encoding.pkg" to its package, but it does not make JDK able to find either the package or the class.
Currently, we can add UTF-7 encoding by adding a class named "sun.io.ByteToCharUTF7", and modify the existing class "sun.io.CharacterEncoding" under rt.jar to add alias for UTF-7. This means we are modifying the JDK, and it might cause a problem when our customers want to update their JDKs.
We had also tried JCharSet but it does not work in our environment.
The questions here are:
1. Why is not "file.encoding.pkg" taking effect in our environment, is it a JDK bug or do we have to do something more?
2. Is it possible to add UTF-7 encoding without modifying "sun.io.CharacterEncoding" to add alias?
Any suggestions will be appreciated.

