I have a script.js file linking in the head of a HTML page (meta: utf-8)
French characters inside the HTML itself are displayed correctly, but those inside the script.js are not:
$('#count_fr').html("entrées") is displayed as entr[]es in browser.
Here is how I point to the js file:
<script type="text/javascript" src="script.js"></script>
I tried
<script type="text/javascript" src="script.js" charset="utf-8"></script>
but no luck.
It looks like the script file is not saved as UTF-8.
You can verify it by using the
filecommand on UNIX like systems, or by opening your text editor and looking for a menu command to change the encoding.