#19351 [Opn->Csd]: Problem with charsets and header function

From: Date: Tue, 01 Oct 2002 03:07:48 +0000
Subject: #19351 [Opn->Csd]: Problem with charsets and header function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-20870@lists.php.net to get a copy of this message
ID: 19351 Updated by: yohgaki@php.net Reported By: sfelix@labeltechnologies.com -Status: Open +Status: Closed Bug Type: Output Control Operating System: win 2k PHP Version: 4.2.3 New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. I think this is fixed in CVS version. If not, please reopen. Previous Comments: ------------------------------------------------------------------------ [2002-09-11 03:52:34] sfelix@labeltechnologies.com 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 this bug report at http://bugs.php.net/?id=19351&edit=1

« previous php.bugs (#20870) next »