Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle astral Unicode symbols #11

Closed
fb55 opened this issue Jul 30, 2013 · 3 comments
Closed

Handle astral Unicode symbols #11

fb55 opened this issue Jul 30, 2013 · 3 comments

Comments

@fb55
Copy link
Owner

fb55 commented Jul 30, 2013

Probably the same way mathiasbynens/he does it.

@mathiasbynens
Copy link

FYI, if you only care about supporting Node, it’s even easier: you can use the built-in punycode module to convert the numeric code point value into the correct symbol.

var punycode = require('punycode'); // no need to `npm install`; it ships with Node
punycode.ucs2.encode([0x1D306]); // returns a string containing only U+1D306 TETRAGRAM FOR CENTRE, i.e. `'𝌆'`

@fb55
Copy link
Owner Author

fb55 commented Jul 30, 2013

That's really neat, thanks! I'll probably implement it myself anyways, for performance reasons, but there were already plenty of cases were I wished I had something like that :)

@mathiasbynens
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants