0

I have a string \u0025A3\u0025A3... e.t.c. So how can I decode that to normal view in C#.

I mean sequence \u0025A3\u0025A3 should looks in decoded mode. For example, the \u0025A3\u0025A3 sequence should looks like "::".

Thanks.

2 Answers2

0

You can use split method to decode your string .

Vyasdev Meledath
  • 8,926
  • 20
  • 48
  • 68
0

The Unicode characters in your string are above \uFFFF so they will display as "?" in the default windows character set, or a "" in some apps. Try this anyway.

string test = "\\u0025A3\\u0025A3";
Regex rx = new Regex(@"\\[uU]([0-9A-F]{6})");
test = rx.Replace(test, match => char.ConvertFromUtf32(int.Parse(match.ToString().Substring(2), NumberStyles.HexNumber)));
mhanney
  • 465
  • 2
  • 11