What is Punycode
Punycode is an encoding syntax which is utilized to change over Unicode (UTF-8) series of characters to essential ASCII series of characters. Since host names just comprehend ASCII characters so Punycode is utilized. It is utilized as an internationalized space name (IDN or IDNA). We should comprehend it with an example:
Assume on the off chance that you look for mañana.com in your program so your program (which is IDNA empowered) first believer this to punycode xn- - maana-pta.com in light of the fact that the character ñ isn't permitted in ordinary space name. It isn't upheld in more seasoned adaptations.
Punycode in Node.js
Punycode.js is packaged with Node.js v0.6.2 and later forms. In the event that you need to utilize it with different Node.js renditions, at that point use npm to introduce punycode module first. You need to utilize require ('punycode') to get to it.
It is used to convert a Punycode string of ASCII symbols to a string of Unicode symbols.
It is used to convert a string of Unicode symbols to a Punycode string of ASCII symbols.