note 37960 rejected from function.ob-iconv-handler by didou

From: Date: Wed, 03 Dec 2003 14:12:20 +0000
Subject: note 37960 rejected from function.ob-iconv-handler by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-61328@lists.php.net to get a copy of this message
Note Submitter: glen@delfi.ee ---- hi it's not mentioned here in doc, but ob_iconv_handler() also sets Header('Content-Type') header, based on value of output_encoding. you might get because of this warning: PHP Warning: Cannot modify header information - headers already sent by (output started at ob.php:15) in ob.php on line 28 1:<? 2:/// 3:Header('Content-Type: text/html; charset=utf-8'); 4: 5:iconv_set_encoding('internal_encoding', 'iso8859-1'); 6:iconv_set_encoding('output_encoding', 'UTF-8'); 7: 8:ob_start('ob_iconv_handler'); 9: 10:// produce latin1 output 11:echo "üä<br>"; 12: 13: 14:// switch to utf8 encoding 15:ob_end_flush(); 16: 17:// produce utf8 output 18:echo "Pühapäev"; 19: 20:// switch back to latin1 21:ob_start('ob_iconv_handler'); 22: 23:// latin1 24:echo "ä<br>"; 25: 26: 27:// end buffering 28:ob_end_flush(); 29: 30:?>

« previous php.notes (#61328) next »