forked from science-ation/science-ation
Move the content-type header out of send_header() so it sends it on ANY request that includes the common.inc (should be every request)
This fixes french characters in all the new ajax'd editors, becuase they obviously werent calling send_header() on the request so the encoding was defaulting to UTF8 and causing improperly encoded characters
This commit is contained in:
parent
879dc845d9
commit
29074faacd
@ -22,6 +22,12 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
//if we dont set the charset any page that doesnt call send_header() (where it used to be set) would defualt to the server's encoding,
|
||||
//which in many cases (like ysf-fsj.ca/sfiab) is UTF-8. This was causing a lot of the newly AJAX'd editors to fail on french characters,
|
||||
//becuase they were being encoded improperly. Ideally, all the databases will be switched to UTF-8, but thats not a near-term possibility,
|
||||
//so this is kind of a band-aid solution until we can make everything UTF8. Hope it doesnt break anything anywhere else!
|
||||
header("Content-Type: text/html; charset=iso-8859-1");
|
||||
|
||||
//set error reporting to not show notices, for some reason some people's installation dont set this by default
|
||||
//so we will set it in the code instead just to make sure
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
@ -374,7 +380,6 @@ function send_header($title="", $nav=null, $icon=null, $titletranslated=false)
|
||||
if($HEADER_SENT) return;
|
||||
else $HEADER_SENT=true;
|
||||
|
||||
header("Content-Type: text/html; charset=iso-8859-1");
|
||||
echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n";
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
Loading…
Reference in New Issue
Block a user