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

unix: Encoding cp856 needs correction

XMLWordPrintable



      Name: asR10013 Date: 04/27/2000



          Byte 0xEE is translated by JVM to character "\u203E" using
      encodig cp856 (cp856_Hebrew_PC). But according to latest unicode
      translation tables
      (ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/CP856.TXT)
      byte 0xEE should be mapped to character "\u00AF"
          The same behavior is observed under Solaris.

      ------------------------- test.java ----------------------------------
      class test {
          public static void main(String args[]) throws Exception {
              byte ba[] = {(byte) 0xEE};
              String s = new String(ba, "Cp856");
              System.out.println("\\u"+Integer.toHexString(s.charAt(0)).toUpperCase());
          }
      }
      --------------------------- output -----------------------------------
      $ java -version
      java version "1.3.0beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0beta-b01)
      Classic VM (build 1.3.0beta-b01, green threads, nojit)
      $ java test
      \u203E

      ======================================================================

            ilittlesunw Ian Little (Inactive)
            alssunw Als Als (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: