I don’t know in what editor did you edit your header.php file – but seemingly some weird characters were added at the beginning of that file (where the odd question marks appear above).
Try to edit, remove…
Thread Starter
flush
(@flush)
Well, I imagine this comes from this in my header.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
But there are no ?? marks in there so I don’t know what to do.
Thread Starter
flush
(@flush)
And I downloaded the header.php file from my server and there are no ??marks in there either.
What could be creating them?
Thread Starter
flush
(@flush)
Thanks Moshu, one of the threads says that these BOM (byte order mark) can come in fact from the index php file that call the header. Mine is like this:
<?php
get_header();
?>
I have some question marks there, so its probably them, no?
Can I delete them without risking to cause havoc in my blog?
If you have anything “nasty” before the code above – just delete it.
Thread Starter
flush
(@flush)
I have nothing at all before that code.
So I must not delete those question marks?
What you posted that IS the code for calling the header.php. PHP code ALWAYS starts with
<?php...
and ends with
?>
Do NOT delete those!
You should search/google/ask: how to remove those BOM characters (which usually are invisible)
Thread Starter
flush
(@flush)
But how can the html be different from the code I see in notepad++? Or how can I make that BOM visible? I can’t delete it if I can’t see it.
Maybe try changing your charset to this:
<meta http-equiv=”Content-Type” content=”text/html; charset=ISO-2022-KR” />
When I valiadted your page by copying and pasting your code into the W3C validator (rather that putting in the URL), it validated just fine, but this message came up:
“The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.”
So it seems IE *does* have an issue with UTF-8 in some cases. (I googled a little on it.) But the above charset is for Korean text, so maybe specifying that will help?
Thread Starter
flush
(@flush)
ok, I’ve just discovered in notepad++ the “convert to utf-8 without BOM” menu… but it’s greyed out and unselectable!!!
PS problem solved, I could encode without BOM
Thank you Moshu!!
That’s the reason I adviced you to SEARCH. Why is so difficult to type in the google box
“remove byte order mark”???
and then going to read this:
http://www.w3.org/International/questions/qa-utf8-bom
Thread Starter
flush
(@flush)
Problem solved. Thanks Moshu. (who’s the guy who invented BOMs..)
I also had the same problem with IE7. The design falled over to the left and the css had no effect until I manually reloaded the page. When running my pages trough The W3C Markup Validation Service it said there was a BOM in my files. I resaved the files, but with no luck. Then I checked my xmlrpc.php file, because I am doing almost all my posting from a home made desktop application. I found that if I took out this line:
.setRequestHeader “Charset”, “utf-8”
IE7 displayed my files perfectly.
I still can’t find a way to delete the BOM characters after reading all of this. It tells me everything about what they are but exactly how do I delete them? Is there a specific editor that can make them visible, a script I can run to parse them or…?