To check the character encoding declared by the server, you can use Firebug (in the Info menu, theres to view HTTP headers). In addition, you can use online services such as Web-Sniffer .
If the charset parameter is specified in the headers of the external .js file, you need to use this encoding if you cannot change the corresponding server settings (possibly the .htaccess file).
If they do not have the charset parameter, you can specify the encoding in the script
element, for example. <script src="foo.js" charset="utf-8">
.
The declared encoding should, of course, correspond to the actual encoding, which you can usually choose when saving the file (if necessary, use the "Save As" command).
source share