title: Eascaping special characters from BLOB data types
body: <p>I am reading a BLOB data type tables from Oracle database. But the special characters are escaping from that. below is my code. </p>
  
  <pre><code>public static void main(String args[]) throws FileNotFoundException
  
  {
  
      System.out.println("Oracle Connect START.");
      Connection conn = null;
  
      String url = "jdbc:oracle:thin:@localhost:1521:";
      String dbName = "xe";
      String driver = "oracle.jdbc.OracleDriver";
      String userName = "T24DBA";
      String password = "ABCD123abcd";
      int locationofp=0;
      ResultSet orset = null;
      ResultSet rs1 = null;
      try {
          Class.forName(driver).newInstance();
          conn = DriverManager.getConnection(url+dbName,userName,password);
          Statement stmt = conn.createStatement();
          orset =stmt.executeQuery("select RECID, XMLRECORD from karthi");
  
          Blob lob = null;
          FileOutputStream fos = new FileOutputStream("C:/DataRead/fbnk.txt");
          DataOutputStream dos = new DataOutputStream(fos);
  
          while (orset.next()) {
              String RECID = orset.getString(1);
  
  
              lob=orset.getBlob("XMLRECORD");
              byte[] bdata = lob.getBytes(1, (int) lob.length());
              String text = new String(bdata);
              System.out.println("TEXT "+ text);
          }
      }
  </code></pre>
  
  <p>The record in the Database is </p>
  
  <pre><code>EUR100011510þGBP100011200þGBP100011250þGBP100011500þGB
  </code></pre>
  
  <p>But the output i got is </p>
  
  <pre><code>EUR100011510�GBP100011200�GBP100011250�GBP100011500�GB
  </code></pre>
  
  <p>All my field Marker characters(þ) are escaping.</p>
  
  <p>Any help will be much appreciated. I am struggling this for the past two days</p>
  
  <p>Thanks</p>