Expression > Forums - Accueil > 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
Poser une questionPoser une question
 

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

  • jeudi 6 mars 2008 15:33Expression Newsgroup Migrator1ModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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?

Réponses

Toutes les réponses

  • mercredi 25 juin 2008 13:33Eddster Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    I'm getting this too! Have you ever had a solution to this?

    Thanks...
  • mercredi 25 juin 2008 13:42Eddster Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
     http://www.95isalive.com/expression/index.html

    This appears to solve the problem.
  • mercredi 25 juin 2008 13:45Ian HaynesMVPMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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
  • mercredi 25 juin 2008 13:54Axel Peter Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     A du 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" /> 

  • mercredi 9 juillet 2008 05:00t22harris Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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?
    • Modifiét22harris mercredi 9 juillet 2008 05:02typo
    •  
  • mercredi 9 juillet 2008 08:26Christoph SchneegansMVPMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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.
  • lundi 12 octobre 2009 08:38ShaMunBd Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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.
  • mardi 3 novembre 2009 22:24Fred Master Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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...
  • mardi 3 novembre 2009 23:17Bill Pearson Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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.