Skip to content

Instantly share code, notes, and snippets.

@jackiewu
Created June 6, 2016 05:32
Show Gist options
  • Save jackiewu/38fda3f29ab74beaa5080961bc7287f6 to your computer and use it in GitHub Desktop.
Save jackiewu/38fda3f29ab74beaa5080961bc7287f6 to your computer and use it in GitHub Desktop.
Chinese to HTML Unicode
// Example "姓名" (姓名)
// it can be used for placehoder of input
"姓名".charCodeAt(0)
> 22995
"姓名".charCodeAt(1)
> 21517
"姓名".charCodeAt(0).toString(16)
> "59d3"
"姓名".charCodeAt(1).toString(16)
> "540d"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment