title: getting junk characters in firefox where as working fine in IE
body: <p>I have used the below piece of code to get the output on the browser using printwriter. </p>
  
  <pre><code>String b= new String(a.getBytes("UTF-16LE"),"UTF-8"); 
  </code></pre>
  
  <p>The output is fine with IE but in firefox i get </p>
  
  <blockquote>
    <p>&lt;�h�3�>�C�o�m�m�e�n�t�s�&lt;�/�h�3�>� �&lt;�t�a�b�l�e�>�&lt;�t�r� �b�g�c�o�l�o�r�=�'�#�E�7�E�7�E�F�'�>�&lt;�t�d�>�P�o�s�t�e�d� �O�n�:� �1�2�-�1�3�-�2�0�1�0� �1�0�:�3�8�:�2�4� �,� �B�y�:</p>
  </blockquote>
  
  <p>This is the sample output of the problem facing.</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "w3.org/TR/html4/loose.dtd"&gt;;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" 
        CONTENT="no-cache"&gt;
    &lt;/head&gt; 
    &lt;body&gt;
      &lt;form name="form" method="post"&gt;
      &lt;% 
      String theString = null; 
      PrintWriter pw = null; 
      String cmntbox = ""; 
      ServletOutputStream outStream = null; 
      try { 
        Connection con = null; 
        PreparedStatement pstmt = null; 
        ResultSet rs = null; 
        String sql = null; 
        InputStream sImage; 
        con = DBConnection.getConnection();
        sql = SELECT statement 
        pstmt = con.prepareStatement(sql); 
        rs = pstmt.executeQuery(); 
        while (rs.next()) { 
          byte bytearray[] = new byte[1048576]; 
          String newLine = System.getProperty("line.separator"); 
          sImage = rs.getBinaryStream(1); 
          StringWriter writer = new StringWriter(); 
          request.setCharacterEncoding("UTF-8"); 
          response.setContentType("text/html;charset=UTF-8"); 
          pw =response.getWriter(); 
          IOUtils.copy(sImage, writer); 
          theString = writer.toString(); 
          pw.write(theString); 
          pw.flush();
          cmntbox = Utility.getCommentPage(id,prcs_area); 
          String comment = new String(cmntbox.getBytes("UTF-16LE"),"UTF-8"); 
          pw.write(comment); 
          pw.flush(); 
          pw.close(); 
        }
  </code></pre>