JDK-6283649 : RFE : Support for "sjis", "euc-jp" and "iso-2022-jp" format
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2005-06-10
  • Updated: 2010-04-02
  • Resolved: 2006-12-12
Related Reports
Relates :  
Description
Using jdk 1.5.0 , it appear that when the customer does a string input 
 read from a file say shift_jis.htm encoding
 eg
 java.io.BufferedReader br = new java.io.BufferedReader ( new 
 java.io.InputStreamReader ( new java.io.FileInputStream 
 ("/export/home/chphua/sunone/ias/sjas8.1ee/nodeagents/puffer/DefaultGC/applications/j2ee-apps/app1/app1_war/shift_jis.htm"), 
 "shift_jis" ) );
             String nextLine = br.readLine ();
      StringBuffer buf =  new StringBuffer();
             while ( nextLine != null )
             {
               buf.append(nextLine);
                nextLine = br.readLine ();
             }
 
 the output is corrupt.  ( see result.gif )

###@###.### 2005-06-10 02:06:48 GMT

Comments
EVALUATION (1)Three new flags x-windows-50221/ISO-2022-JP x-windows-50220/ISO-2022-JP x-windows-iso2022jp/ISO-2022-JP have been added into mustang/6.0 (and backported into 1.4.2_11 and 5.0u7 already) to make iso-2022-jp to compatible with Microsoft's iso-2022-jp variants (ms50221/ms50220), see#6310716 (2)I dont think it's realistic to expect we will do the same thing for SJIS and EUC_JP in Mustang.
03-03-2006

WORK AROUND SUN PS have actually "hacked" the two files to workaround the problem for the customer ByteToCharJIS0208.java CharToByteJIS0208.java to make it work in jdk 1.4.2 The PS have added code block based on the unicode table and NEC extension characters table. http://ash.or.jp/code/codetbl2.htm http://koba.jp/network/mail/JIS-X-0208.html The PS would like to have the changes incorporate into 1.4.2 or 1.5. See attachment for the modified charsets.jar ###@###.### 2005-06-10 02:06:48 GMT
10-06-2005