Character set stuff for MySQL 5.x

This commit is contained in:
james 2007-10-09 18:48:41 +00:00
parent 1c0c51c7fc
commit f0dc0d938f

View File

@ -92,6 +92,9 @@ if(!mysql_select_db($DBNAME))
exit;
}
//this will silently fail on mysql 4.x, but is needed on mysql5.x to ensure we're only using iso-8859-1 (/latin1) encodings
@mysql_query("SET NAMES latin1");
//find out the fair year and any other 'year=0' configuration parameters (things that dont change as the years go on)
$q=@mysql_query("SELECT * FROM config WHERE year='0'");
@ -349,6 +352,7 @@ function send_header($title="")
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">