Funny Symbols Appearing!?!

Discussion in 'Web Design and Development' started by JavaWizKid, Mar 24, 2009.

  1. JavaWizKid macrumors 6502a

    Joined:
    Sep 18, 2008
    #1
    I've been tweaking my site using padding, <ul> tags and <li> tags. All of a sudden my site appears to be displaying strange characters such as this: Â

    It seems to only be affecting this page however: here

    Any ideas why?
     
  2. TEG macrumors 604

    TEG

    Joined:
    Jan 21, 2002
    Location:
    Langley, Washington
    #2
    I have found the "A with Carot" or "Angstrom" characters appear when you have a leading space with in a <ul> and <li> tags. Why they appear, I don't know.

    TEG
     
  3. JavaWizKid thread starter macrumors 6502a

    Joined:
    Sep 18, 2008
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
  5. JavaWizKid thread starter macrumors 6502a

    Joined:
    Sep 18, 2008
  6. pkoch1 macrumors 6502a

    pkoch1

    Joined:
    Oct 3, 2007
    Location:
    Boston
    #6
    a space right before the tag

    so you would want blahblahblah<tag> rather than blahblahblah <tag>
     
  7. JavaWizKid thread starter macrumors 6502a

    Joined:
    Sep 18, 2008
    #7
    Will it be in the code of the page that is displaying it?
     
  8. TEG macrumors 604

    TEG

    Joined:
    Jan 21, 2002
    Location:
    Langley, Washington
    #8
    Yes. You want to make sure that your code is written like this...

    Code:
    This is text<ul>text
    not

    Code:
    This is text <ul> text
     
  9. JavaWizKid thread starter macrumors 6502a

    Joined:
    Sep 18, 2008
    #9
    I think it's coming from somewhere in my php code because it is what I changed. Where would the leading space be showing in this code?

    PHP:
    <?php
        
    // How Many Topics you want to display?
        
    $topicnumber 3;
        
    // Change this to your phpBB path
        
    $urlPath "/forum";
     
        
    // Database Configuration (Where your phpBB config.php file is located)
        
    include 'forum/config.php';
     
        
    $table_topics $table_prefix"topics";
        
    $table_forums $table_prefix"forums";
        
    $table_posts $table_prefix"posts";
        
    $table_users $table_prefix"users";
        
    $link mysql_connect("$dbhost""$dbuser""$dbpasswd") or die("Could not connect");
        
    mysql_select_db("$dbname") or die("Could not select database");
     
        
    $query "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
        FROM 
    $table_topics t, $table_forums f, $table_posts p, $table_users u
        WHERE t.topic_id = p.topic_id AND
        t.forum_id = 9 AND
        f.forum_id = t.forum_id AND
        t.topic_status <> 2 AND
        p.post_id = t.topic_last_post_id AND
        p.poster_id = u.user_id
        ORDER BY p.post_id DESC LIMIT 
    $topicnumber";
        
    $result mysql_query($query) or die("Query failed");                                    
     
        print 
    "";
        while (
    $row mysql_fetch_array($resultMYSQL_ASSOC)) {
     
        echo  
    "<li><a href=\"$urlPath/viewtopic.php?f=$row[forum_id]&t=$row[topic_id]&p=$row[post_id]#p$row[post_id]\" TARGET=\"_blank\">" .$row["topic_title"] ."</a></li>";
        }
        print 
    "";
        
    mysql_free_result($result);
        
    mysql_close($link);
        
    ?>
     
  10. JavaWizKid thread starter macrumors 6502a

    Joined:
    Sep 18, 2008
  11. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #11
    Nothing in the PHP looks wrong and doesn't output the parts that have the angstrom. When you look at the page with your editor can you see the angstroms then? If so, when you delete them, do they return, and if so, in the same place? Also, do you know what character encoding you're using in your editor e.g., utf-8?
     
  12. JavaWizKid thread starter macrumors 6502a

    Joined:
    Sep 18, 2008
    #12
    Dashcode isn't a WYSIWYG editor. It's basically an advanced version of Microsoft Notepad.
     
  13. SelfMadeCelo macrumors regular

    SelfMadeCelo

    Joined:
    Sep 9, 2008
    Location:
    Tulare, CA
    #13
    Your character encoding is off. Usually happens when when you're creating in utf-8 but claiming it's iso-8859-1. Change the declaration to utf-8 and it'll fix it.

    HTML:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
     
  14. JavaWizKid thread starter macrumors 6502a

    Joined:
    Sep 18, 2008
    #14
    Hey thanks, it worked like a charm!
     
  15. SelfMadeCelo macrumors regular

    SelfMadeCelo

    Joined:
    Sep 9, 2008
    Location:
    Tulare, CA

Share This Page