Hi all,
I’m experiencing the most peculiar problem I’ve had to date.
Each time I have a string inside a <p> or <li> that ends with a number 2 or 3 followed by a comma, the output eats the number and leaves the comma.
For example:
“ID3,” in a <p> or <li> magically becomes “ID” when printed to screen (number and comma get eaten up).
This only happens when the number is 2 or 3. All other numbers don’t get eaten.
I’ve tried the below character sets but to no avail at all.
charset=‘ISO-8859-1’
charset=‘UTF-8’
Also tried these fonts but also no luck:
Trebuchet MS
Arial
Please tell me you’ve experienced this before?
Thanks,
system
December 11, 2010, 1:25am
2
<p>ID3,</p>
<p>"ID3,"</p>
displays correctly in my FF3.6
post your actual code so we can see exactly what is going on.
also in your post, in 1 line you are saying
the output eats the number and leaves the comma.
and later on you are saying
(number and comma get eaten up).
which is it? does the comma stay or disappear?
<p>ID3,</p>
<p>"ID3,"</p>
displays correctly in my FF3.6
post your actual code so we can see exactly what is going on.
Thanks for replying.
Odd, very odd.
Unfortunately there isn’t much else I can post since what you tried above is exactly what I’m doing.
This is how I’m defining the content type:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
As for DOC TYPE (though I don’t think this interferes with content type at all):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
How the font-family is setup in the CSS (not overrided by <p> or <ul> or <li>):
#page {
background: #f3f3f3;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #000000;
overflow: hidden;
margin: auto;
@charset "utf-8";
body {
background: #f3f3f3;
font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #777;
}
}
<p>ID3,</p>
<p>"ID3,"</p>
displays correctly in my FF3.6
post your actual code so we can see exactly what is going on.
also in your post, in 1 line you are saying
and later on you are saying
which is it? does the comma stay or disappear?
Sorry, I went back and checked but forgot to tweak the description text. It’s eating the preceding number (2 or 3, other numbers are fine) AND comma so “ID3,” becomes “ID”.
system
December 11, 2010, 1:39am
5
if you’re only going to post bits and pieces of your code then I can’t help.
felgall
December 11, 2010, 2:19am
6
Can you post a link to the page where it is happening. We really need to see all the code in the page to be able to tell what is going on with it.
With a fresh mind I managed to track down the culprit, not obvious at first.
Turns out my html optimization code that condenses the html source code when a page is served in a browser was causing havoc. The below two lines were doing all the damage, once remove the sun shines again:
$bff=preg_replace(" {2,}“,’ ',$bff);
$bff=preg_replace(” {3,}",’ ',$bff);
Uff, what a relief, now back to fixing traditional glitches.
Thanks,
I’m surprised that the patterns without delimiters didn’t throw a syntax error.
And since 2, has no upper limit, what is 3, doing?
Mittineague:
I’m surprised that the patterns without delimiters didn’t throw a syntax error.
And since 2, has no upper limit, what is 3, doing?
No idea, obviously a bug that didn’t interfere other than removing some chars in the page output. It’s gone now, it never threw any errors whether on localhost or online, no surrounding code to skip errors either.