note 79801 deleted from function.utf8-decode by cmb

From: Date: Sun, 04 Dec 2016 12:08:51 +0000
Subject: note 79801 deleted from function.utf8-decode by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208186@lists.php.net to get a copy of this message
Note Submitter: tacchete at gmail dot com ---- Known problem with Byte Order Mark (BOM) and header() in pages of a site. For example at sending headings or to a dynamic conclusion in other coding distinct from UTF-8 by means of XSLT (<xsl:output encoding="windows-1251"/>). To clean all symbols BOM from the text of page: 1. exclude BOM from the main file; 2. write down function of a return call for the buffer <?php header('content-type: text/html; charset: utf-8'); ob_start('ob'); function ob($buffer) { return str_replace("\xef\xbb\xbf", '', $buffer); } ?> it will exclude BOM from a code of the connected files; 3. do not experience for BOM in connected files; 4. be pleased.

« previous php.notes (#208186) next »