title: jQuery AJAX Character Encoding
body: <p>I'm currently coding a French website. There's a schedule page, where a link on the side can be used to load another day's schedule.</p>
  
  <p>Here's the JS I'm using to do this:</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
      function load(y) {
          $.get(y,function(d) {
              $("#replace").html(d);
              mod();
          });
      }
      function mod() {
          $("#dates a").click(function() {
              y = $(this).attr("href");
              load(y);
              return false;
          });
      }
      mod();
      &lt;/script&gt;
  </code></pre>
  
  <p>The actual AJAX works like a charm. My problem lies with the response to the request.</p>
  
  <p>Because it is a French website, there are many accented letters. I'm using the ISO-8859-15 charset for that very reason. However, in the response to my AJAX request, the accents are becoming ?'s because the character encoding seems to be changed back to UTF-8.</p>
  
  <p>How do I avoid this? I've already tried adding some PHP at the top of the requested documents to set the character set:</p>
  
  <pre><code>&lt;?php header('Content-Type: text/html; charset=ISO-8859-15'); ?&gt;
  </code></pre>
  
  <p>But that doesn't seem to work either. Any thoughts?</p>
  
  <p>Also, while any of you are looking here...why does the rightmost column seem to become smaller when a new page is loaded, causing the table to distort and each <code>&lt;li&gt;</code> within the <code>&lt;td&gt;</code> to wrap to the next line?</p>
  
  <p>Cheers</p>