title: Dynamically loaded JavaScript file and non-ASCII characters
body: <p>I have the following problem:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
   alert("1. ČĆŽŠĐčćžšđ");
  &lt;/script&gt;
  
  &lt;script type="text/javascript" src="Tst.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
   var pScript = document.createElement("script");
   pScript.type = "text/javascript";
   pScript.src = "Tst.js";
   pScript.charset = "windows-1250";
   $("body").append(pScript);
  &lt;/script&gt;
  </code></pre>
  
  <p>(These are Croatian characters.)</p>
  
  <p>Contents of Tst.js is:</p>
  
  <pre><code>alert("2. ČĆŽŠĐčćžšđ");
  </code></pre>
  
  <p>Output of this script in FireFox (and Safari, so I've concluded that this is not the problem with the browser, but my code):</p>
  
  <pre><code>1. ČĆŽŠĐčćžšđ
  2. ČĆŽŠĐčćžšđ
  2. �Ǝ���枚�
  </code></pre>
  
  <p>Charset on the main page that is calling this code is Windows-1250.</p>
  
  <p>I don't understand why when I call Tst.js statically (by <code>&lt;script src="Tst.js" type="text/javascript"&gt;&lt;/scipt&gt;</code>) the characters are shown normal, but when I dynamically include Tst.js the characters go bannanas...</p>
  
  <p>And unfortunately I can't port all my code to UTF-8.</p>
  
  <p>Any advice?</p>