#19351 [NEW]: Problem with charsets and header function

From: Date: Wed, 11 Sep 2002 08:52:34 +0000
Subject: #19351 [NEW]: Problem with charsets and header function
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19018@lists.php.net to get a copy of this message
From: sfelix@labeltechnologies.com Operating system: win 2k PHP version: 4.2.3 PHP Bug Type: Output Control Bug description: Problem with charsets and header function We have a php installation with the default charset set to "UTF-8" in the php.ini file (default_charset = "UTF-8") because we handle japanese and latin content from the database. In each page, we specify its charset: if(the current language is japanese) { $strMeta='<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">'; header("Content-type: text/html; CHARSET=UTF-8",true); } else { $strMeta='<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=ISO-8859-1">'; header("Content-type: text/html; CHARSET=ISO-8859-1",true); } With the 4.2.2 version of php we had no problem, but since we updated to 4.2.3, every call to "echo" outputing a text constant like: echo "<html><head><title>"... doesn't work anymore, but echoing data comming from the database works perfectly. Removing the lines containing the header() function in our scripts resolves this problem, but the page doesn't show properly depending on the language selected in the website. In php 4.2.2 we don't see this issue happening, so it seems to be a 4.2.3 related problem. -- Edit bug report at http://bugs.php.net/?id=19351&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19351&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19351&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19351&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19351&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19351&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19351&r=support Expected behavior: http://bugs.php.net/fix.php?id=19351&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19351&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19351&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19351&r=globals

« previous php.bugs (#19018) next »