title: Why is Java BufferedReader() not reading Arabic and Chinese characters correctly?
body: <p>I'm trying to read a file which contain English &amp; Arabic characters on each line and another file which contains English &amp; Chinese characters on each line. However the characters of the Arabic and Chinese fail to show correctly - they just appear as question marks. Any idea how I can solve this problem?</p>
  
  <p>Here is the code I use for reading:</p>
  
  <pre><code>try {
          String sCurrentLine;
          BufferedReader br = new BufferedReader(new FileReader(directionOfTargetFile));
          int counter = 0;
  
          while ((sCurrentLine = br.readLine()) != null) {
              String lineFixedHolder = converter.fixParsedParagraph(sCurrentLine);
              System.out.println("The line number "+ counter
                                 + " contain : " + sCurrentLine);
              counter++;
          }
      }
  </code></pre>
  
  <hr>
  
  <p><strong>Edition 01</strong></p>
  
  <p>After reading the line and getting the Arabic and Chinese word I use a function to translate them by simply searching for <em>Given Arabic Text</em> in an ArrayList (which contain all expected words) (using indexOf(); method). Then when the word's index is found it's used to call the English word which has the same index in another Arraylist. However this search always returns false because it fails when searching the question marks instead of the Arabic and Chinese characters. So my System.out.println print shows me nulls, one for each failure to translate.</p>
  
  <p>*I'm using Netbeans 6.8 Mac version IDE</p>
  
  <hr>
  
  <p><strong>Edition 02</strong></p>
  
  <p>Here is the code which search for translation:</p>
  
  <pre><code>        int testColor = dbColorArb.indexOf(wordToTranslate);
          int testBrand = -1;
          if ( testColor != -1 ) {
              String result = (String)dbColorEng.get(testColor);
              return result;
          } else {
              testBrand = dbBrandArb.indexOf(wordToTranslate);
          }
          //System.out.println ("The testBrand is : " + testBrand);
          if ( testBrand != -1 ) {
              String result = (String)dbBrandEng.get(testBrand);
              return result;
          } else {
              //System.out.println ("The first null");
              return null;
          }
  </code></pre>
  
  <p>I'm actually searching 2 Arraylists which might contain the the desired word to translate. If it fails to find them in both ArrayLists, then null is returned.</p>
  
  <hr>
  
  <p><strong>Edition 03</strong></p>
  
  <p>When I debug I found that lines being read are stored in my String variable as the following:</p>
  
  <pre><code> "3;0000000000;0000001001;1996-06-22;;2010-01-27;����;;01989;������;"
  </code></pre>
  
  <hr>
  
  <p><strong>Edition 03</strong></p>
  
  <p>The file I'm reading has been given to me after it has been modified by another program (which I know nothing about beside it's made in VB) the program made the Arabic letters that are not appearing correctly to appear. When I checked the encoding of the file on Notepad++ it showed that it's ANSI. however when I convert it to UTF8 (which replaced the Arabic letter with other English one) and then convert it back to ANSI the Arabic become question marks!</p>