title: Oracle JDBC driver escapes \n to \\n at time to select data
body: <p>I'm trying to find a explanation why Oracle driver, by default, escapes end-line character "\n" to a escaped string "\\n", that makes the "\n" to show up when I print it. I'd also like to get some suggestions on how to deal with it in a elegante way besides simply replacing "\\n" to "\n" before printing it.</p>
  
  <p>extra info:<br>
  - Oracle driver: ojdbc6.jar<br>
  - Java 1.6.0_18 and 1.7.0_45</p>
  
  <p>Example:<br>
  - DB "column1" data = line1\nline2\nline3   </p>
  
  <pre><code>java.sql.PreparedStatement stmt = conn.prepareStatement("SELECT column1 FROM TABLE1");  
  java.sql.ResultSet rs = stmt.executeQuery();  
  while (rs.next()) {  
     rs.getString(1); // it returns line1\\nline2\\nline3 
  }
  </code></pre>
  
  <p>Appreciate any help,<br>
  Cheers</p>