title: Parsing an utf -8 encoded xml using dom not displaying other language scripts in the file
body: <p>I want to parse the xml below using dom parsing in java.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;PFA date="201303312200" type="daily"&gt;
  &lt;Person id="90061" action="chg" date="31-Mar-2013"&gt;
  &lt;Gender&gt;Male&lt;/Gender&gt; 
  &lt;ActiveStatus&gt;Active&lt;/ActiveStatus&gt; 
  &lt;Deceased&gt;No&lt;/Deceased&gt; 
  &lt;NameDetails&gt;
  &lt;Name NameType="Primary Name"&gt;
  &lt;NameValue&gt;
  &lt;TitleHonorific&gt;Major General&lt;/TitleHonorific&gt; 
  &lt;FirstName&gt;Aslan&lt;/FirstName&gt; 
  &lt;MiddleName&gt;Ibraimis Dze&lt;/MiddleName&gt; 
  &lt;Surname&gt;Abashidze&lt;/Surname&gt; 
  &lt;OriginalScriptName&gt;مرحبا&lt;/OriginalScriptName&gt; 
  &lt;/NameValue&gt;
  &lt;/Name&gt;
  &lt;/NameDetails&gt;
  &lt;/Person&gt;&lt;/PFA&gt;
  </code></pre>
  
  <p>While parsing this  using the following java code</p>
  
  <pre><code>public class ParseXml {
      public static void main(String[] args) {
          String file = "PFA2_201303312200_D.xml";
          if (args.length &gt; 0) {
          file = args[0];
          }
          try{
          DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
          DocumentBuilder builder = factory.newDocumentBuilder();
  
  
          Document document = builder.parse(new File(file));
          System.out.println("Encoder Forment : " +document.getInputEncoding());
          Element parentRoot = document.getDocumentElement();
          System.out.println("Master Node is : "+parentRoot.getTagName());
          for(int i =0;i&lt;parentRoot.getChildNodes().getLength();i++){
              Element root = (Element)parentRoot.getChildNodes().item(i);
  </code></pre>
  
  <p>The file is already a utf-8 file and while reading the data from a IDE (Eclipse) I m getting the data other language scripts as <code>???????</code>. How can I resolve this?</p>