title: change the layout html encoding in symfony
body: <p>I'm doing a web application in Symfony 1.4, and its character encoding is set to utf-8 (default). That is ok, but I would like to change the character encoding to s-jis depending on some situations.</p>
  
  <p>I tried with the code below in the module (action.class.php), but it does not work properly:</p>
  
  <pre><code>if('some situation')
  {
  
     $context = $this-&gt;getContext();
     $response = $context-&gt;getResponse();
     $response-&gt;setContentType('application/xhtml+xml; charset=Shift_JIS');
     mb_internal_encoding('SJIS-win');
     mb_http_output('SJIS-win');
  }
  </code></pre>
  
  <p>Does someone know how to change the character encoding to sjis temporaly?</p>
  
  <p>Thanks!</p>