note 103142 deleted from function.header by tularis

From: Date: Fri, 04 Apr 2014 11:22:51 +0000
Subject: note 103142 deleted from function.header by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-199138@lists.php.net to get a copy of this message
Note Submitter: richardphilip at linkcsik dot net ---- 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.)

« previous php.notes (#199138) next »