Skip to content

Instantly share code, notes, and snippets.

@ginsterbusch
Created July 20, 2012 17:00
Show Gist options
  • Save ginsterbusch/3151888 to your computer and use it in GitHub Desktop.
Save ginsterbusch/3151888 to your computer and use it in GitHub Desktop.
HTTP header charset test
<?php
/**
* Quick character set test
* Simply comment out the HTTP header you DO NOT want to use
*/
header('Content-Type: text/html; charset=iso-8859-1'); // breaks the charset
header('Content-Type: text/html; charset=utf-8'); // correct charset
?>
<html>
<body>
<h1>Das scharfe "ß"</h1>
<p>Ümläute a la carté</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment