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

ISO-8859-8 converter does not correctly output the RTL and LTR marks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 5.0
    • 1.4.1
    • core-libs

      Name: rmT116609 Date: 10/07/2002


      FULL PRODUCT VERSION :
      java version "1.4.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
      Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)

      Operating System: kernel 2.4.18 glibc 2.2.4-24

      Windows 2000, Solaris 2.8


      A DESCRIPTION OF THE PROBLEM :
      Unicode characters 0x200E and 0x200F (the right to left and left to right marks) are not correctly output in the ISO-8859-8 (Hebrew) encoding

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run attached program

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      I expect the bytes FD and FE in the output file. Instead
      there are two copies of the byte 3F. That is, the question
      mark is being used as a replacement character.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.io.*;

      public class TestHebrew {
          
        public static void main(String[] args) throws IOException {
          FileOutputStream fout = new FileOutputStream("hebrew.txt");
          OutputStreamWriter out = new OutputStreamWriter(fout, "ISO-8859-8");
          out.write(0x200E);
          out.write(0x200F);
          out.write("\r\n");
          out.flush();
          out.close();
        }
          
      }
      ---------- END SOURCE ----------
      (Review ID: 165400)
      ======================================================================

            ilittlesunw Ian Little (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: