String.fromCharCode vs output from &#(charcode);
<p>Can anyone explain why I would see a difference in output between using <code>String.fromCharCode(charcode)</code> and printing out <code>&amp;#charcode;</code> for codes between 127 and 160?  It seems looking on firefox, chrome, mac/win and ie the output for both are the same for thousands of other values but not the codes in that range.  Outputting a string from <code>fromCharCode()</code> creates missing characters in that range.</p>

<p>Here's some source if you want to specifically encounter this.</p>

<pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
"http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd"&gt;
&lt;HTML LANG="en"&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;&lt;/TITLE&gt;
&lt;META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
&lt;META name="author" content="(cogknight@yahoo.com)"&gt;
&lt;META name="date" content="Tue Oct 25 02:35:44 CDT 2011"&gt;  
&lt;STYLE TYPE="text/css"&gt;
BODY { font-family: helvetica, sans-serif; }
table { border: 1px solid black; }
td { border: 1px solid black; }
&lt;/STYLE&gt;
&lt;SCRIPT TYPE="text/javascript"&gt;
function init()
{
   var elem = document.getElementById('msg');
   var msg = "&lt;TABLE STYLE='border:1px solid black;'&gt;";
   msg += "&lt;tr&gt;&lt;th&gt;code&lt;/th&gt;&lt;th&gt;fromCharCode&lt;/th&gt;&lt;th&gt;ampersand&lt;/th&gt;&lt;/tr&gt;";
   var ccode = 0;
   for (;ccode &lt; 180; ccode++)
   {
      msg += "&lt;TR&gt;&lt;TD&gt;";
      msg += ccode;
      msg += "&lt;/TD&gt;&lt;TD&gt;";
      msg += String.fromCharCode(ccode);
      msg += "&lt;/TD&gt;&lt;TD&gt;";
      msg += "&amp;#" + ccode + ";";
      msg += "&lt;/TD&lt;/TR&gt;";
   }
   msg += "&lt;/TABLE&gt;";

   elem.innerHTML = msg;
}
&lt;/SCRIPT&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;DIV ID="msg"&gt;
&lt;/DIV&gt;
&lt;SCRIPT&gt;
init();
&lt;/SCRIPT&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
</code></pre>

<p>Thanks for you time,
BBB</p>
