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

Charset mapping for IBM01147 is wrong

XMLWordPrintable

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

      FULL PRODUCT VERSION :
      jdk 1.6_03

      A DESCRIPTION OF THE PROBLEM :
      The mapping for the at sign (@) in charset IBM1047 is wrong, the JDK maps it to 0x44 but it should be at 0x7c.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :

      Execute test snipped, codeset conversion is wrong.

      Actual IBM Codepages are at

      http://www-306.ibm.com/software/globalization/g11n-res.jsp

      ftp://ftp.software.ibm.com/software/globalization/gcoc/attachments/CP01047.pdf

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      b1[0] == 0x7c
      ACTUAL -
      b1[0] == 0x44

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      String s = "@";

      Map m = Charset.availableCharsets();
      Charset cs = (Charset)m.get("IBM01147");

      ByteBuffer bb = cs.encode(s);
      byte[] b1 = bb.array();
      ---------- END SOURCE ----------

            sherman Xueming Shen
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: