note 103142 added to function.header
| From: | richardphilip at linkcsik dot net | Date: | Mon, 28 Mar 2011 21:44:52 +0000 |
| Subject: | note 103142 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178281@lists.php.net to get a copy of this message | ||
Hi there,
I see lots of you have difficulties with utf-8 and BOM.
Some of the respected HTML editors have problem with it...
If your files are in utf-8 for wathever reason and you can switch of insert BOM, most of time if the
file reloaded into the editor it changes it's character coding even with the newest tools
(2011).
The first thing is ("headers already sent") almost every time, you can notice this. (Even
when you didn't give any visible output, before the headers.) But if you change character
encoding, your project could be a mess espedcially if you prints out characters outside the english
alphabet like ű Šú and such...
I had a hard time figure out, how can keep the utf-8 after reopen the file and edit it if I
don't include BOM in it.
The solution is soo simple.
Every module which is included or not I allways write a special character in comment. something
like: //ű.
or in the html section: print "<!--ű-->";
in this way you absolutely not have to include bom and yet, your files will be encoded in utf-8.
(If your editor gives you an opportunity to change the encoding, then you are good to go.)
----
Server IP: 69.147.83.197
Probable Submitter: 88.132.16.193
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/103142
Del: integrated -- https://master.php.net/note/delete/103142/integrated
Del: useless -- https://master.php.net/note/delete/103142/useless
Del: bad code -- https://master.php.net/note/delete/103142/bad+code
Del: spam -- https://master.php.net/note/delete/103142/spam
Del: non-english -- https://master.php.net/note/delete/103142/non-english
Del: in docs -- https://master.php.net/note/delete/103142/in+docs
Del: other reasons-- https://master.php.net/note/delete/103142
Reject -- https://master.php.net/note/reject/103142
Search -- https://master.php.net/manage/user-notes.php