title: Replace Unicode escape sequences in a string
body: <p>We have one text file which has the following text</p>
  <pre><code>&quot;\u5b89\u5fbd\u5b5f\u5143&quot;
  </code></pre>
  <p>When we read the file content in C# .NET it shows like:</p>
  <pre><code>&quot;\\u5b89\\u5fbd\\u5b5f\\u5143&quot;
  </code></pre>
  <p>Our <em>decoder method</em> is</p>
  <pre><code>public string Decoder(string value)
  {
      Encoding enc = new UTF8Encoding();
      byte[] bytes = enc.GetBytes(value);
      return enc.GetString(bytes);
  }
  </code></pre>
  <p>When I pass a hard coded value,</p>
  <pre><code>string Output=Decoder(&quot;\u5b89\u5fbd\u5b5f\u5143&quot;);
  </code></pre>
  <p>it works well, but when we use a variable value it is not working.</p>
  <p>When we use the string this is what we get from the text file:</p>
  <pre><code>  value=(text file content)
    string Output=Decoder(value);
  </code></pre>
  <p>It returns the wrong output.</p>
  <p>How can I fix this?</p>