title: How to escape special chars when writing into a text file
body: <p>I'm reading this string</p>
  
  <pre><code>string input = "Hello, my name is \t Peter \n how are you ? ";
  </code></pre>
  
  <p>I'm printing this in my file:</p>
  
  <pre><code>Hello, my name is      Peter
  how are you? 
  </code></pre>
  
  <p>I want the result to be: </p>
  
  <pre><code>Hello, my name is \t Peter \n how are you ? 
  </code></pre>
  
  <p>How can I escape special characters like tabs and break lines when writing into a file text ?</p>