-4

I storing my messages as utf-8 to preserve emoji but how do I decode it again and show its original form This is the Sample Message - %e2%9c%8c

  String result = java.net.URLDecoder.decode(contacts.getYourmessage(), "UTF-8");
1

2 Answers 2

3

This is the Sample Message - %e2%9c%8c

It is url-encoded string. So you can

var str = WebUtility.UrlDecode("%e2%9c%8c");

which returns

Sign up to request clarification or add additional context in comments.

Comments

0

This is for swift:

var str = "%e2%9c%8c"
print(str.removingPercentEncoding)

Output:

Optional("✌")

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.