title: Issue in encode/decode in python 3 with non-ascii character
body: <p>I am trying to use python3 unicode_escape to escape \n in my string, but the challenge is there are non-ascii characters present in the whole string, and if I use utf8 to encode and then decode the bytes using unicode_escape then the special character gets garbled. Is there any way to have the \n escaped with a new line without garbling the special character?</p>
  
  <pre><code>s = "hello\\nworld└--"
  print(s.encode('utf8').decode('unicode_escape'))
  
  Expected Result:
  hello
  world└--
  
  Actual Result:
  hello
  worldâ--
  </code></pre>