title: Showing text from resources.resx in JavaScript
body: <p>This is example code in <a href="http://en.wikipedia.org/wiki/ASP.NET_MVC_Framework">ASP.NET MVC</a> 3 <a href="http://en.wikipedia.org/wiki/Microsoft_ASP.NET_Razor_view_engine">Razor</a>:</p>
  
  <pre><code>@section header
  {
      &lt;script type="text/javascript"&gt;    
          $(function() {
              alert('@Resources.ExampleCompany');
          });
      &lt;/script&gt;
  }
  
  &lt;div&gt;
      &lt;h1&gt;@Resources.ExampleCompany&lt;/h1&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The code above this is just an example, but it also shows my problem with encoding. This variable @Resources.ExampleCompany is a file <em>resources.resx</em> with value <code>ExampleCompany = "Twoja firma / Twój biznes"</code></p>
  
  <p>In JavaScript, the alert shows the "<code>Twoja firma / Tw&amp;#243;j biznes</code>".</p>
  
  <p>Why is character 'ó' '&amp;#243'? What am I doing wrong? </p>
  
  <p>In HTML tag, <code>&lt;h1&gt;@Resources.ExampleCompany&lt;/h1&gt;</code> is displayed correctly.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Mark Schultheiss wrote a good hint and my "ugly solution" is: </p>
  
  <pre><code>var companySample = "@Resources.ExampleCompany";
  $('#temp').append(companySample);
  alert($('#temp').text());
  </code></pre>
  
  <p>Now the character is <code>&amp;#243;</code> and looks good, but this is still not answer to my issue.</p>