weird symbols all over the page - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

weird symbols all over the page

lih0nmanlih0nman Posts: 30Member
hi.

i have a problem with weird symbols appearing on my page that look that this: ?

they are appearing in most of my *.php files.

(if it cannot be displayed in this post, view here: http://www.chezjeff.net/file_archive/weirdsymbol.bmp)

i checked the source of the rendered page in the browser. they aren't in the source code, but they are appearing in the *.php pages.

how can i get rid of them? thanks.

Comments

  • IDKIDK Posts: 1,784Member
    : hi.
    :
    : i have a problem with weird symbols appearing on my page that look that this: ?
    :
    : they are appearing in most of my *.php files.
    :
    : (if it cannot be displayed in this post, view here: http://www.chezjeff.net/file_archive/weirdsymbol.bmp)
    :
    : i checked the source of the rendered page in the browser. they aren't in the source code, but they are appearing in the *.php pages.
    :
    : how can i get rid of them? thanks.
    :

    It could be other characters like newline or some foreign letters that the font or program didn't support.
  • lih0nmanlih0nman Posts: 30Member
    : It could be other characters like newline or some foreign letters that the font or program didn't support.
    :


    you mean, like a
    line-break tag or a   placeholder?
  • IDKIDK Posts: 1,784Member
    : : It could be other characters like newline or some foreign letters that the font or program didn't support.
    : :
    :
    :
    : you mean, like a
    line-break tag or a   placeholder?
    :
    No, like on programs that doesn't support them
  • lih0nmanlih0nman Posts: 30Member
    : : : It could be other characters like newline or some foreign letters that the font or program didn't support.
    : : :
    : :
    : :
    : : you mean, like a
    line-break tag or a   placeholder?
    : :
    : No, like on programs that doesn't support them
    :

    there aren't any characters like that.
    my site is in English so it doesn't contain any accented characters.
    anything else that could go wrong?
  • IDKIDK Posts: 1,784Member
    : : : : It could be other characters like newline or some foreign letters that the font or program didn't support.
    : : : :
    : : :
    : : :
    : : : you mean, like a
    line-break tag or a   placeholder?
    : : :
    : : No, like on programs that doesn't support them
    : :
    :
    : there aren't any characters like that.
    : my site is in English so it doesn't contain any accented characters.
    : anything else that could go wrong?
    :

    Post your code at the place it uccurs
  • lih0nmanlih0nman Posts: 30Member
    ok
    please have a look at this ...

    http://www.chezjeff.net/file_archive/weirdsymbol2.bmp

    the symbol is right above 'Entries under the category ...'.
    this is part of dispcategory.php?cat=15

    ******************BEGIN********************

    Blog
     


    <?php

    /* copy the query string */
    $catnum = $_GET["cat"];

    if ($catnum == "whatis")
    include('whatis.htm');
    else {
    if ((is_finite($catnum) == 1 ) && ($catnum >= 0)) {
    /* check if the query string is valid (numeric and positive) */
    $file = fopen($catnum.".txt", "r");
    /* opens the file corresponding to $catnum
    $nEntry = fgets($file);
    if ($nEntry != 0) { /* check if the category has entry(ies) under it */
    $n = 0;
    while ($n != $nEntry) {
    /* read all the contents in the file */
    $entrytitle[$n] = fgets($file);
    $entryurl[$n] = fgets($file);
    $n += 1;
    }
    fclose($file);
    $catn = $catnum;
    include('catindex.php');
    /* write the content using HTML formatting */
    echo "

    Entries under the category ".$catname."

    ";
    echo "

    ";
    $n = 0;
    while ($n != $nEntry) {
    echo ''.$entrytitle[$n].'
    ';
    $n += 1;
    }
    } else {
    echo '

     

    No entries are under this category.

    ';
    }

    } else {
    /* this 'else' corresponds to 'if ($catnum == "whatis") ' */
    echo '

     

    Invalid query string. Please verify.

    ';
    }
    }
    ?>


    *******************END*************************

    and this is the content of 15.txt

    *******************BEGIN***********************

    1
    September 1, 2006 - Official Launch
    http://www.chezjeff.net/blog/admin/entry.php?id=6

    ********************END************************

  • IDKIDK Posts: 1,784Member
    : ok
    : please have a look at this ...
    :
    : http://www.chezjeff.net/file_archive/weirdsymbol2.bmp
    :
    : the symbol is right above 'Entries under the category ...'.
    : this is part of dispcategory.php?cat=15
    :
    : ******************BEGIN********************
    :
    :
    :

    Blog
     

    :
    :
    : <?php
    :
    : /* copy the query string */
    : $catnum = $_GET["cat"];
    :
    : if ($catnum == "whatis")
    : include('whatis.htm');
    : else {
    : if ((is_finite($catnum) == 1 ) && ($catnum >= 0)) {
    : /* check if the query string is valid (numeric and positive) */
    : $file = fopen($catnum.".txt", "r");
    : /* opens the file corresponding to $catnum
    : $nEntry = fgets($file);
    : if ($nEntry != 0) { /* check if the category has entry(ies) under it */
    : $n = 0;
    : while ($n != $nEntry) {
    : /* read all the contents in the file */
    : $entrytitle[$n] = fgets($file);
    : $entryurl[$n] = fgets($file);
    : $n += 1;
    : }
    : fclose($file);
    : $catn = $catnum;
    : include('catindex.php');
    : /* write the content using HTML formatting */
    : echo "

    Entries under the category ".$catname."

    ";
    : echo "

    ";
    : $n = 0;
    : while ($n != $nEntry) {
    : echo ''.$entrytitle[$n].'
    ';
    : $n += 1;
    : }
    : } else {
    : echo '

     

    No entries are under this category.

    ';
    : }
    :
    : } else {
    : /* this 'else' corresponds to 'if ($catnum == "whatis") ' */
    : echo '

     

    Invalid query string. Please verify.

    ';
    : }
    : }
    : ?>
    :
    :
    : *******************END*************************
    :
    : and this is the content of 15.txt
    :
    : *******************BEGIN***********************
    :
    : 1
    : September 1, 2006 - Official Launch
    : http://www.chezjeff.net/blog/admin/entry.php?id=6
    :
    : ********************END************************
    :
    :
    OK, this is what I would recomend...

    DEBUG...

    Insert a echo ""
    Before and after the wierd chars.

    Try to isolate where it comes from.


    This is what I could find in the output, it doesn't corespond to your code but it's close...
    [code]

    Blog

    ?

    First of September

    [/code]

    If you manage to isolate it, like this
    [code]

    Blog



    ?

    First of September

    [/code]

    You could as a last resort do like this:

    [code]

    Blog

    First of September

    [/code]

    But I think you will find out where the problem lies before that is necesary.
  • lih0nmanlih0nman Posts: 30Member
    i'll have a try.
    thanks very much
Sign In or Register to comment.