Expression > Forums Home > Expression Studio Forums > Expression Web and SuperPreview > "" is added to any php files I edit - is anyone else seeing thi (Jay) - 6/16/2007 1:03 AM PST
Ask a questionAsk a question
 

Answer"" is added to any php files I edit - is anyone else seeing thi (Jay) - 6/16/2007 1:03 AM PST

  • Thursday, March 06, 2008 3:33 PMExpression Newsgroup Migrator1ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    By: Jay


    Expression Web is adding "" at the beginning of any/all php files I edit 
    with it.  This is causing problems with session_start(); since those 
    characters are interpreted as html thus starting the session.
    
    Is this a know problem?  Is anyone else seeing this?

Answers

All Replies

  • Wednesday, June 25, 2008 1:33 PMEddster Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    I'm getting this too! Have you ever had a solution to this?

    Thanks...
  • Wednesday, June 25, 2008 1:42 PMEddster Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
     http://www.95isalive.com/expression/index.html

    This appears to solve the problem.
  • Wednesday, June 25, 2008 1:45 PMIan HaynesMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    This is the 'Byte Order Mark' or BOM.

    To remove from a page in EW V2 right click the page and select encoding and then uncheck the 'Include a byte order mark (BOM' checkbox.

    To set the editor option for EW itself, go to Tools - Page Editor Options - Authoring' and uncheck the BOM options in the list of file extensions.

    For EW V1 see http://by-expression.com/content/bom.aspx

    HTH


    Ian

    http://www.ew-resource.co.uk
    http://www.fp-resource.co.uk


    Ian Haynes
  • Wednesday, June 25, 2008 1:54 PMAxel Peter Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    It appear when you use the charset utf-8 in your content-type meta

    You have to use the iso-8859-1

    replace this :

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 

    by this :

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 

  • Wednesday, July 09, 2008 5:00 AMt22harris Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I am still having trouble with the  string showing up. I didn't have the trouble until I edited some of my PHP files with Expressions WEB 1.0 so then I read this thread and spent the $100 to upgrade to 2.0.  I've done all of the stuff that has been recomended on this thread and I've opened all my PHP files, made a trivial changes and saved them again. Most of the  stuff has gone away but on one stuborn page I'm still getting it. I've been chasing this bug for days now and my hair has all been pulled out and is laying on the floor. I guess I need to search my files with a hex editor. 

    The trouble comes from a PHP RSS reader script and  only shows up if the file it is supposed to read is valid. Otherwise the error message is garbage free. So maybe the RSS feed has it embedded. Trouble is it is screwing up a Javascript document.write() call that will not digest the . Do you suppose the author of the RSS feed was using Expressions WEB? But then, why was it working a month ago?
    • Edited byt22harris Wednesday, July 09, 2008 5:02 AMtypo
    •  
  • Wednesday, July 09, 2008 8:26 AMChristoph SchneegansMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    What's the URL of the feed? BOMs are not exclusive to xWeb, and since RSS is XML, it is perfectly valid to contain a BOM. Your PHP script is broken if it can't deal with this.
  • Monday, October 12, 2009 8:38 AMShaMunBd Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    do this:
    Stage 1:
        <!-- Meta setup -->
        <!-- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> -->
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    Stage 2:
    <?php

    // WRONG:
    echo utf8_encode("Geïnspireerd News ...."); 

    // WRONG:
    echo htmlentities("Geïnspireerd News ...."); 

    // CORRECT: simple text as it is
    echo ("Geïnspireerd News ...."); 
    ?>



    Reg


    ShaMun
    Belgium, Leuven.
  • Tuesday, November 03, 2009 10:24 PMFred Master Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Use Vim 7.2 (gVim Diff is a part of the installation) Right click on gVim Diff (properties) and change "C:\Program Files\Vim\vim72\gvim.exe" -d   into   "C:\Program Files\Vim\vim72\gvim.exe" -b.
    Open your html/php site and you'll probably see those strange signs. Delete it, save and voila...
  • Tuesday, November 03, 2009 11:17 PMBill Pearson Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    ShaMunBd: Do you realize that this thread had been dead for a year and a half!!!??? And the question had long ago been answered. There is NO reason to dig this up after all this time.

    However, now that it has been dug up, before we put it to rest, I should point out that Axel Peter's answer was wrong. There's nothing wrong with UTF-8, in fact, it's preferred. Just to clarify, if someone searches for this information.

    Ian has the correct answer...

    This is the 'Byte Order Mark' or BOM.

    To remove from a page in EW V2 right click the page and select encoding and then uncheck the 'Include a byte order mark (BOM' checkbox.

    To set the editor option for EW itself, go to Tools - Page Editor Options - Authoring' and uncheck the BOM options in the list of file extensions.

    And, Fred...This forum is about editing in EW, not some oddball text editor that few people use.


    Now, let's let this thing die. The OP got his answer a year and a half ago. There is no point in adding to this.