asmith Posted June 10, 2008 Share Posted June 10, 2008 hi i struggled with a piece of code for like 3 hours, then i decided to delete everything to find out what's the problem. this simple code : <?php include('anyfile.php'); echo ' <html> <body> <table border="10"> <tr><td>asdas</td></tr></table> </body> </html>'; ?> If this file is saved in ANSI , everyting goes right. IF this file is saved in UTF-8 (as i'm using arabic characters i have to save it on UTF-, the include line inserts gap at the top of the page. a white line with a height of 5 maybe, that i killed myself to remove, it won't go unless i remove the include line. (i've tried all body margin , padding to 0 . it is not part of the html i guess) What should i do ? ??? ??? ??? (it all happens in IE 6. FF is fine about it) Quote Link to comment Share on other sites More sharing options...
discomatt Posted June 10, 2008 Share Posted June 10, 2008 This is due to the BOM (byte order marker) at the start of UTF documents. Your editor may give you the option of not including these when you save your file... Quote Link to comment Share on other sites More sharing options...
asmith Posted June 10, 2008 Author Share Posted June 10, 2008 i'm using notepad. Should i save the file in another editor? Quote Link to comment Share on other sites More sharing options...
discomatt Posted June 10, 2008 Share Posted June 10, 2008 Use another editor... one that allows you to take BOM marks out of UTF encoded files. I like using EditPad Lite ( no direct PHP support ) for snippets and Eclipse PDT for larger projects. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.