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

unicode identifiers? #1710

Closed
tj opened this issue Jan 25, 2014 · 3 comments
Closed

unicode identifiers? #1710

tj opened this issue Jan 25, 2014 · 3 comments

Comments

@tj
Copy link

tj commented Jan 25, 2014

are these supposed to be transpiled? I'm just getting syntax errors

@mbostock
Copy link
Member

Yes, JavaScript supports Unicode identifiers.

If you’re using d3.v3.js (non-minified), you need to specify the UTF-8 charset. That is typically done either by:

<meta charset="utf-8">

Or:

<script src="http://d3js.org/d3.v3.js" charset="utf-8"></script>

If you’re using d3.v3.min.js, the minified file is escaped with UglifyJS’s --ascii command-line option, so it is not dependent on the charset.

@tj
Copy link
Author

tj commented Jan 25, 2014

interesting, good to know I thought that was a near-future thing ES6/7 thing. thanks!

@mbostock
Copy link
Member

Good post on the subject here: http://mathiasbynens.be/notes/javascript-identifiers

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

No branches or pull requests

2 participants