Skip to content

Instantly share code, notes, and snippets.

@naoyat
Created October 9, 2012 01:32
Show Gist options
  • Save naoyat/3856038 to your computer and use it in GitHub Desktop.
Save naoyat/3856038 to your computer and use it in GitHub Desktop.
surrogate pair test
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>surrogate pair test</title>
</head>
<body>
<p>"<span id="sample">&#131083;</span>"</p><!-- U+2000B -->
<script type="text/javascript">
var s = document.getElementById("sample").innerHTML;
document.write("<hr>");
document.write("length="+ s.length +"<br>");
document.write(s.charCodeAt(0).toString(16) + " " + s.charCodeAt(1).toString(16));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment