Nbsp bug!

  • Thread starter Hurkyl
  • Start date

Hurkyl

Staff Emeritus
Science Advisor
Gold Member
14,845
17
Ack! Stupid non breaking spaces!

I found a bug:

Suppose I include a non-breaking space (& nbsp ;) into one of my posts, such as the one seen here: →   .

Now, I follow this procedure:

I edit the post, and then submit it without any changes.

The nonbreaking space turns into an asterisk, as shown here: → * .

(I applied this procedure to this post, BTW, though I re-entered the code for the first nonbreaking space)
 

honestrosewater

Gold Member
2,071
5
ExperimentExperimentExperimentExperimentExperiment5 ExperimentExperimentExperimentExperiment9Experiment10ExperimentExperiment12 ExperimentExperiment
 
Last edited:

honestrosewater

Gold Member
2,071
5
honestrosewater said:
Experiment.................................................................................................. ... .....
Maybe & #160 ; works. Yes, it seems to work, but the source code still looks funny. Hm, apparently it doesn't work. Okay, well, it at least stays a space- I just can't tell if it breaks or not- spaces are put in automatically for some reason.? Okay, it works the first time, but afterward shows up as a regular space.

I remember having a similar problem with some other code, but I can't remember what it was. Anywho, I don't know if the non-breaking space in unicode is different, but using the unicode code fixed the problem before, even though unicode doesn't automatically work in IE (of course :rolleyes: ).
 
Last edited:

Danger

Gold Member
9,564
244
What the hell is a 'non-breaking space'?
(Sorry, but you 2 seemed way too content just being off in this thread by yourselves.)
 

honestrosewater

Gold Member
2,071
5
Danger said:
What the hell is a 'non-breaking space'?
(Sorry, but you 2 seemed way too content just being off in this thread by yourselves.)
Good, I was feeling rather lonely here. I suspect you already know (aren't you a writer?), but a non-breaking space just doesn't allow a line break. :rolleyes: If I want to type O U C H ! but don't want part of it to end up getting wrapped to the next line, like O U C
H ! , then instead of putting normal spaces between each letter, I put non-breaking spaces between each letter so they all stay on the same line. :smile:
 
Last edited:

Hurkyl

Staff Emeritus
Science Advisor
Gold Member
14,845
17
Danger: Try   putting   lots   of   space   between   words   like   this.
 

honestrosewater

Gold Member
2,071
5
Hurkyl said:
Danger: Try putting lots of space between words like this.
If that's what you want to do, in the meantime, you can use white text, like------so.
 

enigma

Staff Emeritus
Science Advisor
Gold Member
1,738
9
or you could just use the
[ code ]

[ /code ]

tags
 

Danger

Gold Member
9,564
244
honestrosewater said:
Good, I was feeling rather lonely here. I suspect you already know (aren't you a writer?), but a non-breaking space just doesn't allow a line break. :rolleyes
Nope. Sorry. The only word processors that I've used are Atariwriter and Word Perfect 5 (and TED, about 25 years ago when I used to sneak into the basement of the Math building at U of C and steal a few hours on Multix in the middle of the night). As far as I know, none has that feature. The closest that I'm familiar with is a code which suppresses auto-hyphenation on a by-the-word basis. My beloved WP5 won't run on my even-more beloved Mac, so I'm stuck with MS Word. Unfortunately, since it came with the computer I don't have a manual. I've wondered about it a bit on this thing that we're using right now, because I get quite irritated when a smilie ends up on a line by itself. Are there instructions for this somewhere?
 

honestrosewater

Gold Member
2,071
5
Danger said:
Nope. Sorry. The only word processors that I've used are Atariwriter and Word Perfect 5 (and TED, about 25 years ago when I used to sneak into the basement of the Math building at U of C and steal a few hours on Multix in the middle of the night). As far as I know, none has that feature. The closest that I'm familiar with is a code which suppresses auto-hyphenation on a by-the-word basis. My beloved WP5 won't run on my even-more beloved Mac, so I'm stuck with MS Word. Unfortunately, since it came with the computer I don't have a manual. I've wondered about it a bit on this thing that we're using right now, because I get quite irritated when a smilie ends up on a line by itself. Are there instructions for this somewhere?
I've only used Word and found it adequate. I sort of even like Word. :redface: I don't know if you're asking about Word or PF, so...
To insert a non-breaking space in Word, click on the Insert menu > select Symbol > click the Special Characters tab > highlight nonbreaking space in the list > click the Insert button. There are various shortcuts if you use it often.

To insert a non-breaking space in PF, I guess there's at least two options.
You can type & # 1 6 0 ; without the spaces wherever you want the space to appear.
For example:
witty remark& # 1 6 0 ;:smile:
Result:
witty remark :smile:
But the non-breaking space turns into a regular space when it's "cycled through" or whatever a second time, as when you edit, preview, or quote.
A little more trouble, but would always work- type [color = white]-[/ color] without the spaces wherever you want the space to appear.
For example:
witty remark[color = white]-[/ color]:smile:
Result:
witty remark-:smile:
 
Last edited:

Danger

Gold Member
9,564
244
honestrosewater said:
I've only used Word and found it adequate. I sort of even like Word. :redface:
We all have our shameful secrets. :tongue:
Thanks for the tips, Rosie. It was PF that I was asking about, but the info about Word will probably come in handy some time.
 

Moonbear

Staff Emeritus
Science Advisor
Gold Member
11,349
51
honestrosewater said:
I've only used Word and found it adequate. I sort of even like Word. :redface: I don't know if you're asking about Word or PF, so...
To insert a non-breaking space in Word, click on the Insert menu > select Symbol > click the Special Characters tab > highlight nonbreaking space in the list > click the Insert button. There are various shortcuts if you use it often.

To insert a non-breaking space in PF, I guess there's at least two options.
You can type & # 1 6 0 ; without the spaces wherever you want the space to appear.
For example:
witty remark& # 1 6 0 ;:smile:
Result:
witty remark :smile:
But the non-breaking space turns into a regular space when it's "cycled through" or whatever a second time, as when you edit, preview, or quote.
A little more trouble, but would always work- type [color = white]-[/ color] without the spaces wherever you want the space to appear.
For example:
witty remark[color = white]-[/ color]:smile:
Result:
witty remark-:smile:
None of the codes anyone has suggested have ever worked for me from a Mac. I'll give yours a try though. For some reason, PF doesn't "see" the code the same when it's sent from my mac as when it is sent from a     PC. (I just inserted three spaces before "PC" with the code you listed above...lets see if they appear as nothing or as question marks or asterisks, or *gulp* spaces!).
 

honestrosewater

Gold Member
2,071
5
Moonbear said:
None of the codes anyone has suggested have ever worked for me from a Mac. I'll give yours a try though. For some reason, PF doesn't "see" the code the same when it's sent from my mac as when it is sent from a PC. (I just inserted three spaces before "PC" with the code you listed above...lets see if they appear as nothing or as question marks or asterisks, or *gulp* spaces!).
Woo hoo! They're spaces! Or they are for me. But "a---PC" should have stayed on the same line. :frown:
I don't know very much about the whole thing. I just learned enough to write some html and xhtml. Every character has a numeric code and some have name codes (ex. nbsp, amp). If you need or want to use the code, you enclose it in an ampersand and semicolon: & nbsp ;. If it's a numeric code, you put a hash in front of the numbers: & # 160 ;. But there are different character sets, so it gets more complicated. :yuck: Plus, on PF, the text in the text box goes through other doohickies that I know nothing about. :)

But I can still write "Moonie" in ISO-8859-1, using the numberic codes. M-77, o-111, n-110, i-105, e-101: Moonie. It should work for you too.

If you're running Windows, you can use the Character Map (Start > Programs > Accessories > System Tools > Character Map).
 

Moonbear

Staff Emeritus
Science Advisor
Gold Member
11,349
51
Yep, they're spaces for me too :biggrin:, but "a      PC" ended up in the middle of a line for me, so I couldn't see if it would break or not. That's okay, I don't often need non-breaking spaces, but sometimes just being able to add extra spaces is something I want to do for emphasis or to get something aligned correctly.
 

Related Threads for: Nbsp bug!

  • Posted
Replies
3
Views
526
  • Posted
Replies
7
Views
2K
  • Posted
Replies
5
Views
2K
  • Posted
Replies
8
Views
938
  • Posted
Replies
14
Views
714
  • Posted
Replies
8
Views
2K
  • Posted
Replies
5
Views
2K
  • Posted
Replies
6
Views
2K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving

Hot Threads

Top