I double space regularly in my posts.

I modify and save, then these  show up every where I double spaced at.

Any queses as why this is happenning???

Regards,  P1  8)

PS:  It's annoying to fix them.
Posted on 2006-03-08 13:28:58 by P1
Because the board is using the non-breaking-space HTML code to force a space. HTML ignores anything more than just one space, so it has a markup called   which allows you to force an extra space. These are especially useful if you want a single line to vertically scroll the web page but not to wrap on your spaces. It's just a part of the translation process to keep things lined up. If you want to parse them out for later storage Hutch's QEditor can strip HTML Code.. or if you have PERL you can use..

my $file = join (' ', @ARGV);
open ( INPUT, "$file" ) or die "Could not open '$file'\n";
open ( OUTPUT, ">$file.new") or die "Could not open '$file.new'\n";
while ( my $line = <INPUT> ) {
  $line = s/\&nbsp\;/\ /ig;
  print OUTPUT $line;
close ( OUTPUT );
close ( INPUT );

edit: forgot to close my file handles  :oops:

Bryant Keller
Posted on 2006-03-08 18:36:13 by Synfire

Please fix the substitution from |nbsp; to &nbsp;

Thanks in Advance!!!

Bryant,  Thanks for the heads up!  It's the board making the bad substitutions.  You see them evreywhere.

Regards,  P1  8)
Posted on 2006-03-09 17:10:14 by P1
The fact that this thread now looks goofy should be proof that the problem has been temporarily fixed. I had to change the topic of the thread because it became a simple space due to the resolution of the issue.
Posted on 2006-03-11 00:16:10 by SpooK

This is unrelated to the topic but I just downloaded and had a look at your NASM32 package and it looks good and all the demos work correctly. I always had a soft spot for NASM and even had a good play with it in early 97 but sad to say I don't have the time these days.

Give me a yell if there is anything I can help you with out of the toys I have available.


hutch at movsd dot com
Posted on 2006-03-11 01:43:10 by hutch--
Thanks Spook!!!?  They are still being inserted.?  note: below

Regards,?  P1?  8)

Edit to check for proper substitution.

1st edit put them in.
2nd edit took them out.
3rd edit put them in.
4th edit took them out.
5th edit put them in.
I believe there is a pattern developing.
Posted on 2006-03-13 10:42:54 by P1
first test  second test  third test  fourth test  fifth test  sixth test    seventh test   

This is an example of the same conditions you set-up. There has been no evidence of your condition. Since you are the only one who seems to suffer from this issue, I would check your browser/language/character-encoding because it seems like a client issue on your end.
Posted on 2006-03-13 18:19:08 by SpooK
Spook, seems like I have the same problem. Check this post http://www.asmcommunity.net/board/index.php?topic=24416.msg178315#msg178315
All double spaces in the code snippet got replaced by ¦nbsp.
Posted on 2006-03-13 21:03:27 by arafel
What web browsers are you (arafel and P1) using (name/release/version/patch)???
Posted on 2006-03-13 22:08:52 by SpooK
IE 6.0.2900.2180.xpsp_sp2_gdr.050301-1519 and Firefox

It's really weird that you can't see those replaced characters. It doesn't seems to be a client side problem. I tried both FF and IE (including Mozilla from linux station) with different encodings and the problem persisted on all occasions.
Posted on 2006-03-13 22:32:32 by arafel
I just tried it with one of the posts and I didn't have any problem (double-space remains a double-space). It might be a problem with the UTF-8 encoding on this forum. I still need info from P1.

Also, I would like to know the keyboard layouts you use on your OS when attempting this.
Posted on 2006-03-13 22:49:38 by SpooK
Okay, I've finally downloaded SMF and looked over the code and it seems everything is right.

$message = strtr($message, array('  ' => ' &nbsp;', "\r" => '', "\n" => '<br />', '<br /> ' => '<br />&nbsp;'));

So I went in search and I found a few posts on UTF-8 in regards to non-english language character sets messing up &nbsp; The example I saw was that on the vietnamese UTF-8 variant the &nbsp; generates an ?  character. Therefore I think Spook is going in the right direction with this. Check and make sure your language encoding for your browser is set to English, if not that's probably the problem. If it is, let me know and I'll continue hunting down a solution. :)

EDIT That's definately it! notice the ? above, that was supposed to be a hyphenated a character. And the script changed it to a ?. Check the language setting for your browser.

Bryant Keller
Posted on 2006-03-13 23:39:20 by Synfire
Btw, if anyone is wondering what character is being translated to the ? it's the ASCII 0xE0 character.
Posted on 2006-03-14 01:38:08 by Synfire
Spook, iam using QWERTY layout.
Synfire, encoding is set to english.

Maybe the following will explain the problem better.

When I post something (doesn't matter what encoding is used. unicode, western, etc.. all the same) it appears correctly. No nbsp stuff.
But when the post is modified (only when thread has been reloaded, otherwise it doesn't work) - nbsp`s appear. modify+save again - they disappear, modify+save again - appear gain.
Posted on 2006-03-14 10:44:15 by arafel

K, then I'll continue looking over the source here in a little bit
Posted on 2006-03-14 12:04:40 by Synfire
I have IE 6.0.2800.1106 on W2K-SP4.

I am firing up FF to see if it does the same thing.

Regards,  P1  8)

Posted on 2006-03-15 18:14:23 by P1
In FF, the |nbsp went away, but I have the diamond shape with a ? in it.

Regards,  P1  8)
Posted on 2006-03-15 18:21:02 by P1
It might take me a little bit. There are several possible spots where this might be occuring. I've uploaded a test version of SMF on my dev-machine to test on. As soon as I find a solution which doesn't effect the rest of the board then I will pass it over to Spook. The problem in this is that if Spook was to make any changes to the primary filtering parts of the code it could really mess up the forum (or even invalidate security filters which could make the forum vulnerable to certain attacks). This is because all parsing of security elements and html elements are done in the same area  :|

The developers of SMF do know about this problem (I've seen a few posts on their forum about it) but have not commented on a fix for it as of yet. While there is a fix which was distributed by a poster on their forum, the person who posted stated that they were "not sure what else it might have messed up in the process", so that's not going to be the road I wish to go ;)

Currently, I'm looking over the forums Javascript functions because it seems odd that the browsers behavior could be effecting the server side PHP translation (especially with the filters I'm looking at) I'm checking to see if, since javascript is used to parse the content when using "Preview", the javascript parsing methods might be what's causing the different translations of code when they are passed to the server. I'm working on this the best I can and I'll be sure to post back when I find a solution that won't mess anything up :)

Bryant Keller
Posted on 2006-03-15 18:36:39 by Synfire

Your test SMF site works for me.

Regards,¦nbsp; P1¦nbsp; ¦nbsp;8)
1st?  Modify Note: ¦nbsp;¦nbsp; are still here.
2nd?  Modify Note it interesting that they turn on and off with each succeeding modify.?  Which is why I thought it was a board problem.?  Observation: When I manual type |,n,b,s,p,; SMF filters it.

New observation:  In using modify, on a post, I don't need to change a thing and SMF will put in and take out the |,n,b,s,p,&  in the post.
Posted on 2006-03-17 11:27:13 by P1

Thanks for the quick reply. I'm still working trying to obtain the error that occured here on that test board. The problem is until I can recreate the error, there really is no way for me to find/debug it. I've sent an email to the creators of SMF to find out if they might have, by chance, updated the 1.1R2 release with a fix for this error (as there were posts about this error on their board) but I've not recieved a reply yet.

Modify Note it interesting that they turn on and off with each succeeding modify.  Which is why I thought it was a board problem.  Observation: When I manual type |,n,b,s,p,; SMF filters it.

That is actually what has directed my attention to the JavaScript code rather than the PHP code. In the PHP code one parser is used to generate the proper & nbsp; code. But in the JavaScript I noticed that the "Preview" and "Modify" actually go through an extra filter for client side display during editing. The filter isn't called every time, so it makes sense to me that the error is probably there. This would also explain why it's only working with MSIE and not with FF (as they both use different scripting engines).

Thanks for the feedback and I will continue to try to sort this out.

Bryant Keller
Posted on 2006-03-17 13:06:08 by Synfire