Actually there is a line of the form me":"Playboy\u2122","g it needs to be brought into normal form by replacing Unicode \ u2122 with the corresponding symbol ™

Closed due to the fact that the essence of the question is not clear to the participants Igor , PashaPash 12 Oct '18 at 22:25 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • How do you present yourself the result? So that the studio debugger shows you Unicode in the form that you want? - tym32167
  • I need to output the result to the texbox and save it to a file - Monolith
  • Try System.Text.RegularExpressions.Regex.Unescape(@"Playboy\u2122"); - Ares
  • I need to translate all unicode characters into a normal view, this is a string for example - Monolith
  • @Monolith in your case, the json deserializer should deal with an escaping. Do not disassemble the line manually, feed it to some json.net - and get a normal object with normal values ​​inside. - PashaPash

1 answer 1

Everything is quietly displayed, here's the code (made the font bigger so that it could be seen in the picture)

 class F : Form { public F() { var tb = new TextBox(); Font fnt=new Font(tb.Font.FontFamily,14.0F); tb.Font = fnt; tb.Text = "Playboy\u2122"; this.Controls.Add(tb); } } 

Result. No problem.

example

  • Well, this is if you explicitly set in the code, and if I have a string formed by the response data to the get request? - Monolith
  • @Monolith I do not see in your question anything about the get request. You gave an example of the line - I showed how to use it. How do I know what your request is, what the answer is and what encoding of the strings in that answer you did not mention in the question? :) - tym32167 pm
  • it turns out \ u2122 in the debugger looks like \\ u2122 and not \ u2122, how to avoid commenting? - Monolith
  • @ tym32167 What did you not guess that me":"Playboy\u2122", in question - is this a JSON-a chip? - Igor
  • @Igor I do not have gnomes who could tell :) - tym32167