Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4388236

sun.io.ByteToCharJISAutoDetectcan't recognize Japanese EUC string correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.2.0
    • core-libs

      Name: boT120536 Date: 11/10/2000


      Solaris VM (build Solaris_JDK_1.2.2_05, native threads, sunwjit)

      The JISAutoDetect converter can't recognized Japanese-EUC strings correctly. My
      fix is for 1.2.2, but JDK 1.3 has same bug, too.

      This cause of misrecognition is that a current mask table of 1st byte has wrong
      Shift-JIS code range data.
      TEST CASE:
      import java.io.IOException;

      public class jadtest {
          public static void main(String[] args) throws IOException {
      byte euc[] = {
      (byte)0xc0, (byte)0xbe,
      (byte)0xbb, (byte)0xb3,
      };
      System.out.println(new String(euc, "JISAutoDetect"));
          }
      }
      (Review ID: 107930)
      ======================================================================

            ilittlesunw Ian Little (Inactive)
            bonealsunw Bret O'neal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: