What is Punycode used for?
Punycode (sometimes referred to as puny code) is an efficient and simple transfer encoding structure designed for International Domain Names in Applications (IDNA). IDNA has provided a specified architecture for international domain names, and Punycode is a way of representing Unicode code points using ASCII characters in these domain names.
Punycode is the official standard approved for encoding IDN domains. It is a type of a general algorithm called Bootstring. Bootstring is a set of basic code points which is used to represent the string of code points from a larger set. In Punycode encoding, the native language characters are converted into a limited character set.
Punycode is completely designed for IDNA protocol for converting domain names into ASCII codes. In Punycoding, each component of a domain name is encoded into an ASCII string. Only limited ASCII characters and numbers are used in Punycode encoding: A-Z, 0-9, and the hyphen (-). The ASCII characters in Unicode string are represented as such. The non-ASCII characters are expressed by ASCII characters that are allowed in the host domain name labels. The prefix “xn--” is added to the translated Punycode string. Different prefixes are used by other encoding procedures and the translation into Punycode is entirely dependent on the user application (web browser).
Punycode has specific parameter values which comply with the IDNA. In Punycode encoding there is a unique basic string that represents every extended string. The Punycode encoding and decoding algorithms are easy to implement and can work with all script systems. Another benefit of Punycode is that it caters to high reversibility so that any extended string related to the basic string can be recovered easily from the basic string.
In Punycode, each Unicode string is converted into unique ASCII codes, so the possibility of multiple Unicode representations isn’t extensive. Punycode encoding has a special feature, mixed-case annotation, which can be used to effectively express strings that are case sensitive. This feature is not available in other Unicode methods. Punycode encoding offers advantages such as language independency and compressed code size. It is ideal for encoding Korean, Japanese and Chinese characters.


