Warpling
Warpling

Reputation: 2115

How can I "puny" encode emoji?

Emojis have percent encoded representations, but they also have "puny" representations. How does this work? Is there an easy way to convert emojis to punty codes?

For example, the key emoji (🔑) can be represented by the percent encoding %f0%9f%94%91 and the puny code xn--kv8h.

Upvotes: 1

Views: 345

Answers (1)

Warpling
Warpling

Reputation: 2115

There are actually many built solutions for iOS including this pod: Puntycode-Cocoa.

The general method for encoding Unicode as ASCII using punycode is explained in detail on Wikipedia.

Upvotes: 1

Related Questions