Strange extra code show's up

Help
barock
2007-05-25
2013-05-30
  • barock

    barock - 2007-05-25

    When executing the following code I get "1f4d" at the top of the line. Looks like some noise. How do I fix this?

    $snoopy = new Snoopy();

    $url = "http://eoe.is/liverpool/?feed=rss2";

    $snoopy->fetch($url);

    echo $snoopy->results;

     
    • sharp

      sharp - 2007-05-26

      Well, you load an XML file ... and then you simply try to display it`s contents .... nothing wrong so far ... but if your browser has character-encoding set on WESTERN and the XML has UTF8, you might get something like that... which is the signature of UTF encoding .... I`m not sure if this is the case ... but try to run the code again .. and play a little with your browser encodings... (View-> Character Encoding ->...... for FireFox Mozilla) .... lemme know how it went...

       
    • barock

      barock - 2007-05-26

      I've tried playing with the browser encodings, but still I get the same result as before. I've also tried saving the content to a file, but with the same results. And I've tried using some UTF8 encoding and decoding functions in PHP as well.

      Oh and I tried executing this in the following browsers: IE 6, IE 7, Mozilla Firefox and Safari.

      I'm beginning to think that this is a bug in Snoopy.

       
      • McDope

        McDope - 2007-05-26

        often this happens if you use snoopy with HTTP/1.1 instead of 1.0.
        but sometimes i noticed this also happens when using HTTP/1.0

        i always thought it is my crappy code but if it happens to you too i will be a bug i think...
        as workaround you can cut the "crap-chars" out, e.g with substr()

         
    • barock

      barock - 2007-05-26

      After a further examination of the output from snoopy->results, there is more "noise" later in the contents as well, so using substr() is not a good solution, maybey only for this file, put I'm using this on a few hundred of feeds and the noise never is the same.

       
    • barock

      barock - 2007-05-28

      This seams to be a bug in WP 2.1.X, after the user update to version 2.2 this extra code is gone.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks