View Full Version : Funny Symbols Appearing!?!
JavaWizKid
Mar 24, 2009, 06:30 PM
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 (http://betatestingzone.com/displayolderpost.php?p=11)
Any ideas why?
TEG
Mar 24, 2009, 06:33 PM
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
JavaWizKid
Mar 24, 2009, 06:39 PM
What's a leading space?
Thanks
angelwatt
Mar 24, 2009, 06:49 PM
What editor are you using?
JavaWizKid
Mar 24, 2009, 06:50 PM
Dashcode for Mac OS X.
pkoch1
Mar 24, 2009, 06:51 PM
What's a leading space?
Thanks
a space right before the tag
so you would want blahblahblah<tag> rather than blahblahblah <tag>
JavaWizKid
Mar 24, 2009, 06:53 PM
Will it be in the code of the page that is displaying it?
TEG
Mar 24, 2009, 06:55 PM
Yes. You want to make sure that your code is written like this...
This is text<ul>text
not
This is text <ul> text
JavaWizKid
Mar 24, 2009, 07:03 PM
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
// 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);
?>
JavaWizKid
Mar 25, 2009, 12:19 PM
Anyone?
angelwatt
Mar 25, 2009, 12:37 PM
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?
JavaWizKid
Mar 25, 2009, 12:53 PM
Dashcode isn't a WYSIWYG editor. It's basically an advanced version of Microsoft Notepad.
SelfMadeCelo
Mar 25, 2009, 12:53 PM
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.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
JavaWizKid
Mar 25, 2009, 01:03 PM
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.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Hey thanks, it worked like a charm!
SelfMadeCelo
Mar 25, 2009, 01:09 PM
No problem. Happens to me all the time lol
vBulletin® v3.6.10, Copyright ©2000-2009, Jelsoft Enterprises Ltd.