Charset mapping for IBM01147 is wrong

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: 6
    • Component/s: 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 ----------

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: