title: Page detected as UTF-8 by browsers when it has 'ISO-8859-1' as meta charset
body: <p>I'm dealing with a site transfer, and in the process my charset got fouled up. At first, I transferred all files with no alterations, and the files on the new server showed <code>&lt;?&gt;</code> icons for special characters. A glance at the browser's character encoding (Chrome and FF) told me it was auto-detecting UTF-8. The meta charset of pages is set to ISO-8859-1. Copy is drawn from various tables in multiple databases (don't ask).</p>
  
  <p>On the original site, all displayed as it should. On the new site, <code>&lt;?&gt;</code>... I dug into it, found default charset ="UTF-8" in php.ini, set it to nothing. Now the majority of pages on the site display fine, the browser recognizes the meta charset tag, everybody's happy; that is, until I navigate to a folder off root.</p>
  
  <p>The files in this folder, although their meta charset is ISO-8859-1, are somehow telling the browser to be read as UTF-8, which means I'm seeing <code>&lt;?&gt;</code> on these pages. If I set the browser to read as ISO-8859-1, then it displays fine. Auto-detect resets it to UTF-8. Any ideas?</p>
  
  <p>Thank you!</p>
  
  <p><strong>Update (added from comment below):</strong></p>
  
  <p>I ran the page through the <a href="http://validator.w3.org/i18n-checker/" rel="nofollow">W3C checker</a> as recommended by martinstoeckli, and it tells me that the HTTP Content-Type is <code>Content-Type: text/html; charset=utf-8</code> while the meta tag is <code>&lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/&gt;</code>, which gives me a <strong>Conflicting character encoding declarations</strong> error. Crazy thing is, I can't for the life of me figure out where the UTF-8 declaration is coming from! It's nowhere in any file, all files were saved UTF-8 w/out BOM, the php.ini is set to declare no default, the folder's .htaccess is set like PatomaS suggests.</p>
  
  <p>(For what it's worth, Mozilla's Web Sniffer confirms HTTP header Content-Type of <code>text/html; charset=utf-8</code>.)</p>
  
  <p><strong>Update:</strong>
  While we did not reach a solution to this problem as I posed it, I did decide that the best way to resolve my character encoding issues is to refactor everything to use UTF-8 encoding. Of course, this probably means you will see me on here with more exciting newbie questions like "Just why won't utf8-encode() do my łâùñdrÿ?"</p>
  
  <p>Of course, that means the mystery remains: what is causing the server to send HTTP Content-type charset headers of UTF-8 when it appears that everything is configured differently?</p>