• Resolved andyfarmerboy

    (@andyfarmerboy)


    This is really weird. I am working on designing a theme for a blog and I am getting a strange character inserted in several places in the code. Firefox always displays the site correctly but it messes IE all up.

    The character only appears when the blog is running the theme I am designing so it must be linked to the pages I have edited; but I have searched through them all and I haven’t found any that contain the strange character. Right now it is showing up in 3 places in the code (code below). You probably won’t see the character in the code pasted below and I know that it isn’t visible in notepad but it does show up as a tiny dot in Microsoft Expression. If you visit the blog and “view source” ->copy->paste the code into Word the character shows up large and visible. (There is one right before the Doctype statement, and one before each of the div’s)

    Does anyone have any ideas where this thing is coming from?
    Thanks for your help.

    Blog address : http://www.enliteart.com/blog

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
    
    […]
    
    <div id="sidebar">
    		<ul>
    […]
    
    <div id="footer">
    	<p>
Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter andyfarmerboy

    (@andyfarmerboy)

    NOTE: you must go to the blog to see the character; it did not paste in the code above.

    Is it the > ?? I don’t see the tiny dot, or perhaps I’m looking in the wrong place.

    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.enliteart.com%2Fblog%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

    Byte-Order Mark found in UTF-8 File.

    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.

    Helpful (solution) article:
    http://www.95isalive.com/expression/

    Thread Starter andyfarmerboy

    (@andyfarmerboy)

    Thanks for your help. I applied the Expression fix and then re-saved the files but that didn’t change anything. I tried creating a new header.php file and copied the code to it but that didn’t change anything either.

    Again, I don’t see the character in the php code; it only shows up in the generated html.

    I will look more at it tonight and see what I can find.

    DianeV,
    The dot is REALLY hard to see in Expression – it appears to take up no space and the code will go right over it. If you enter a “space” on either side of it you see it much better.

    Thread Starter andyfarmerboy

    (@andyfarmerboy)

    Hay it looks like that worked… now… can someone tell me what I just did.

    This is what I did to fix the problem:
    I opened the php files that I had saved in Expression in notepad and simply did a “save as” changing the encoding from UTF-8 to ANSI. That seemed to do the trick.

    Now I don’t really know much about page encoding but I take that to mean the server needs the ANSI encoded php files to create the HTML in UTF-8 (please correct me if I’m wrong).

    The real problem I have is I cannot seem to get Expression to save the file in any other encoding. I did the “fix” noted above and tried changing the “site settings” default page encoding to ANSII but it is still saving the php in UTF-8. Thus I guess I will have to do my editing in notepad or find another text editor (what do you guys use?)

    Thanks Kafkaesqui for your tip on the encoding. I probably would have figured it out eventually but you saved me a lot of time. If someone could point me to some good reading on page encoding… -it looks like could use a little info in that area.

    For Anyone else using Expression you may want to watch for this.

    Thread Starter andyfarmerboy

    (@andyfarmerboy)

    UPDATE: Re-saved all php files using notepad++ as UTF-8 “without BOM” and all is well.

    I think I understand now… I just needed to get rid of the BOM from my php files.

    Thanks all.

    Hello, i know this thread is 3 months old but i want to say thank you, basially i did what is mentioned in the last post here UPDATE: Re-saved all php files using notepad++ as UTF-8 “without BOM” and all is well.

    And it has sorted 2 problems for me, i wasn’t actually getting that strange character on pages, did in WP admin though, i was though experiencing the often mentioned functions.php errors, i also had this problem with my first theme that i had created.

    And i had saved mine in UTF-8, so i resaved as you did andyfarmerboy to UTF-8 without BOM and it sorted that but also its sorted a sidebar problem in IE where one sidebar was stretching and a sidebar next to it was pushed out of line, slightly wider than the footer.

    From now on instead of notepad il use Notepad++ and save as UTF-8 without BOM.

    Absolutely brilliant…thanks for this thread.

    I have been chasing my tail all day on this one and it wasn’t until I read this that I remembered I originally edited my index.php in M$ Expression. What a revelation!

    Once I had ftp’d the default index.php over my M$ corrupted version, I stepped into the wp-admin editor, pasted my own content code and voila…now IE looks like Firefox…no more left alignment…happily centred now.

    Cannot thank you enough andyfarmerboy for sharing your pain with us.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Strange character inserted messing up IE’ is closed to new replies.