Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

JavaWizKid

macrumors 6502a
Original poster
Sep 18, 2008
572
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?
 
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
 
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($result, MYSQL_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);
    ?>
 
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?
 
Dashcode isn't a WYSIWYG editor. It's basically an advanced version of Microsoft Notepad.
 
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">
 
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">

Hey thanks, it worked like a charm!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.