I have this code to help parse the unicode for an emoji:
public string DecodeEncodedNonAsciiCharacters(string value)
{
return Regex.Replace(
value,
@"\\u(?<Value>[a-zA-Z0-9]{4})",
m =>
((char)int.Parse(m.Groups["Value"].Value, NumberStyles.HexNumber)).ToString();
);
}
so I put my code as such
DecodeEncodedNonAsciiCharacters("\uD83C\uDFCB\uD83C\uDFFF\u200D\u2642\uFE0F");
into Console.WriteLine();
which gives me this emoji 🏋🏿♂️ so my question is how can I turn this
"\uD83C\uDFCB\uD83C\uDFFF\u200D\u2642\uFE0F"
into this Codepoints
U+1F3CB, U+1F3FF, U+200D, U+2642, U+FE0F
the codepoints above are from Emojipedia.org
@"\\u(?<Value>[a-fA-F0-9]{4})"
notef
andF