note 73277 deleted from function.session-start by peehaa
| From: | peehaa@php.net | Date: | Mon, 27 Feb 2017 08:21:08 +0000 |
| Subject: | note 73277 deleted from function.session-start by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208864@lists.php.net to get a copy of this message | ||
Note Submitter: design at ericcorriel dot com
----
For those encoding their pages in UTF-8 but running into problems with BOM data (Byte Order Marks)
being outputted before anything else - such as $_SESSION data - but wish to use UTF-8 encoding, and
who do NOT wish to use UTF-8 No BOM encoding because the latter produces weird results when using
foreign language accented characters, try the following :
- Save your document with UTF-8 No BOM encoding (on a mac, using BBEdit, this is normally found on
the very bottom left corner of the window). This will produce a document that will not output BOM
data.
- then, in your scripts, include the following:
header('Content-Type: text/html; charset=UTF-8');
before your call to session_start()
hope that helps someone.