Problem should need to WebUtility.UrlDecode(String) the text :
Converts a string that has been encoded for transmission in a URL into a decoded string.
If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. URL encoding converts characters that are not allowed in a URL into equivalent hexadecimal escape sequences. The UrlEncode method creates a URL-encoded string.
URL decoding replaces hexadecimal escape sequences with corresponding ASCII character equivalents. For example, when embedded in a block of URL-encoded text, the escape sequences %3c
and %3e
are decoded into the characters <
and >
.
Sample as follow:
using System.Net;
Console.WriteLine("Encode:" + WebUtility.UrlEncode(""));
// out ==> %F0%9F%98%82
Console.WriteLine("Decode:" + WebUtility.UrlDecode("%F0%9F%98%82"));
// out ==>
Console.WriteLine("Encode:" + WebUtility.UrlEncode("this is a text message"));
// out ==> this+is+a+text+message
Console.WriteLine("Decode:" + WebUtility.UrlDecode("this+is+a+text+message"));
// out ==> this is a text message
Solution:
Not directly CrossClipboard.Current.SetText(message);
Try with CrossClipboard.Current.SetText( WebUtility.UrlDecode(message));