If you really don’t control the string, then you need to replace those escape sequences with their values:
Regex.Replace(s, @"\u([0-9A-Fa-f]{4})", m => ((char)Convert.ToInt32(m.Groups[1].Value, 16)).ToString());
and hope that you don’t have \\
escapes in there too.
More Related Contents:
- Best way to reverse a string
- Convert a Unicode string to an escaped ASCII string
- Reading Email using Pop3 in C# [closed]
- Can’t get Czech characters while generating a PDF
- regex for accepting only persian characters
- How do I convert Unicode escape sequences to Unicode characters in a .NET string?
- How to convert a Unicode character to its ASCII equivalent
- Displaying Arabic characters in C# console application
- How can a Label control display Japanese characters properly when the Font used doesn’t support this language?
- How can I perform a Unicode aware character by character comparison? [closed]
- C# regex to remove non – printable characters, and control characters, in a text that has a mix of many different languages, unicode letters
- Characters in string changed after downloading HTML from the internet
- Display Unicode characters in converting Html to Pdf
- Kanji characters from WebClient html different from actual Kanji in website
- How to compare Unicode characters that “look alike”?
- How to recognize if a string contains unicode chars?
- Get supported characters of a font – in C#
- MySQL C# Text Encoding Problems
- ASCIIEncoding.ASCII.GetBytes() Returning Unexpected Value
- Difference between Char.IsDigit() and Char.IsNumber() in C#
- How to output unicode string to RTF (using C#)
- Is there a way to check whether unicode text is in a certain language?
- Reverse a string with accent chars?
- UTF-8 or UTF-16 or UTF-32 or UCS-2
- Sending Unicode Messages (such as in Persian and Arabic) in C# using AT Commands through GSM Modem
- How do I remove emoji characters from a string?
- Convert fullwidth to halfwidth
- C# and UTF-16 characters
- Why is the length of this string longer than the number of characters in it?
- Parsing through Arabic / RTL text from left to right