Unexpected  and à characters before non-ASCII characters almost always mean that:
- You saved text encoded using UTF-8
- You read this text as if it were encoded (what is usually called) Latin 1 encoding
This is because most non-ASCII characters you come across (at least if you are dealing with text written in languages whose spelling is derived from the Latin alphabet , like Western European languages) belong to the Latin 1 unicode block (including £ and the most accented or modified versions of English letters, for example é and æ ), and UTF 8 encodes all the elements of this block with a two-byte sequence, starting from byte C2 or C3 . However, these bytes respectively indicate  and à in Latin encoding 1.
Quick demo in Python shell:
>>> b'\xc2'.decode('latin1') 'Â' >>> '£'.encode('utf8') b'\xc2\xa3' >>> '£'.encode('utf8').decode('latin1') '£' >>> 'æ'.encode('utf8') b'\xc3\xa6' >>> 'æ'.encode('utf8').decode('latin1') 'æ'
If these unexpected characters appear in your JavaScript, what should be wrong is that you saved your UTF-8 JavaScript file, but the browser believes that it is encoded in Latin, and therefore incorrect characters appear after decoding.
To fix this, make sure that you correctly specify the encoding of your JavaScript file using an HTTP header, for example:
content-type: text/javascript; charset=utf-8
source share