Skip to content

Instantly share code, notes, and snippets.

@varrunr
Created May 4, 2012 04:50
Show Gist options
  • Save varrunr/2592105 to your computer and use it in GitHub Desktop.
Save varrunr/2592105 to your computer and use it in GitHub Desktop.
punicode to unicode
<html>
<head>
<script type="text/javascript" src="punycode.js"> </script>
</head>
<body>
<script type="text/javascript">
var url = 'http://xn--oogle-qmc.com';
result = url.replace(/.*?:\/\//g, "");
alert(punycode.toUnicode(result));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment