There is another aspect to this which I only recently discovered. There seems to be a bug in Chrome, in that it does not always send the charset in the ContentType header, resulting in unrecognised token errors. Usually resetting the browser with Ctrl-F5 will remedy the problem but the charset will not get cached so you have to use Ctrl-F5 every time.This happens even with <meta charset="UTF-8"> right at the beginning of the <head> section and with charset="UTF-8" in all the <script> tags.
This seems to depend on how the server is set up because I have code that loads perfectly well on localhost (xampp apache server) but not on my website (also apache but seemingly set up with different options).
However, I discovered a workaround which seems to work perfectly, which is to change the extension of your javascript files from .js to .utf8.js. Apache interprets extensions like this as a hint to load the file with the utf-8 charset even if the browser hasn't asked for it. I haven't got round to checking whether any other browsers have the same problem, or whether any other servers will understand the utf8 in the file extension.
I got the idea from an interesting article on character encoding. The URL is