We have one text file that has the following text
"\u5b89\u5fbd\u5b5f\u5143"
When we read the containt file in C # .net, it shows how
"\\u5b89\\u5fbd\\u5b5f\\u5143"
Our decoder method
public string Decoder(string value) { Encoding enc = new UTF8Encoding(); byte[] bytes = enc.GetBytes(value); return enc.GetString(bytes); }
When I compress the code value
string Output=Decoder("\u5b89\u5fbd\u5b5f\u5143");
It works well, but when we use a variable value, this time does not work.
When we use the string we get from the text file
value=(text file containt) string Output=Decoder(value);
It returns the wrong output.
Please help me solve the problem.
source share