1 min read

charset="utf-8"

To use the latest version of D3, you need to use charset="utf-8" in the call to <script>.

I’m giving a talk at ENAR in just over a week, on interactive graphics. My slides (still in preparation) are on the web.

The slides were working fine locally on my laptop, but they weren’t working on my web server…I was getting a syntax error regarding an illegal character.

I figured out that I needed to add charset="utf-8", like so:

<script charset="utf-8" type="text/javascript" src="js/d3.js">
</script>