By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,445 Members | 1,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,445 IT Pros & Developers. It's quick & easy.

word wrapping

P: n/a
word wrapping normally treats some spaces as line feeds, if there
hasn't been a line feed for quite a while. so while a string with
eighty consecutive a's might not word wrap, a space placed squarely in
the middle of that string will sorta word wrap. so why doesn't it
seem to work with !'s? here's a page that demonstrates how !'s don't
seem to word wrap:

http://www.geocities.com/terra1024/wordwrap.htm

here's a page that shows how a's word wrap:

http://www.geocities.com/terra1024/wordwrap2.htm

any help would be appreciated - thanks :)
Jul 20 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a

"yawnmoth" <te*******@yahoo.com> wrote in message
news:a0**************************@posting.google.c om...
word wrapping normally treats some spaces as line feeds, if there
hasn't been a line feed for quite a while. so while a string with
eighty consecutive a's might not word wrap, a space placed squarely in
the middle of that string will sorta word wrap. so why doesn't it
seem to work with !'s? here's a page that demonstrates how !'s don't
seem to word wrap:

http://www.geocities.com/terra1024/wordwrap.htm

here's a page that shows how a's word wrap:

http://www.geocities.com/terra1024/wordwrap2.htm

any help would be appreciated - thanks :)


Once I fought my way past GeoCities' attempt to run applications in my
browser and advertise to me, found that IE6 has a problem with your
exclamation points. Wrapping is correct in all other browsers I tried. So
it's an IE bug.

Jul 20 '05 #2

P: n/a
On Mon, 19 Apr 2004 17:40:23 -0400, Harlan Messinger
<h.*********@comcast.net> wrote:

"yawnmoth" <te*******@yahoo.com> wrote in message
news:a0**************************@posting.google.c om...
word wrapping normally treats some spaces as line feeds, if there
hasn't been a line feed for quite a while. so while a string with
eighty consecutive a's might not word wrap, a space placed squarely in
the middle of that string will sorta word wrap. so why doesn't it
seem to work with !'s? here's a page that demonstrates how !'s don't
seem to word wrap:

http://www.geocities.com/terra1024/wordwrap.htm

here's a page that shows how a's word wrap:

http://www.geocities.com/terra1024/wordwrap2.htm

any help would be appreciated - thanks :)


Once I fought my way past GeoCities' attempt to run applications in my
browser and advertise to me, found that IE6 has a problem with your
exclamation points. Wrapping is correct in all other browsers I tried. So
it's an IE bug.


Wrapping is also incorrect in Opera 7.23.
Jul 20 '05 #3

P: n/a
On Mon, 19 Apr 2004 21:59:55 -0400, Neal <ne*****@spamrcn.com> wrote:
On Mon, 19 Apr 2004 17:40:23 -0400, Harlan Messinger
<h.*********@comcast.net> wrote:

"yawnmoth" <te*******@yahoo.com> wrote in message
news:a0**************************@posting.google.c om...
word wrapping normally treats some spaces as line feeds, if there
hasn't been a line feed for quite a while. so while a string with
eighty consecutive a's might not word wrap, a space placed squarely in
the middle of that string will sorta word wrap. so why doesn't it
seem to work with !'s? here's a page that demonstrates how !'s don't
seem to word wrap:

http://www.geocities.com/terra1024/wordwrap.htm

here's a page that shows how a's word wrap:

http://www.geocities.com/terra1024/wordwrap2.htm

any help would be appreciated - thanks :)


Once I fought my way past GeoCities' attempt to run applications in my
browser and advertise to me, found that IE6 has a problem with your
exclamation points. Wrapping is correct in all other browsers I tried. So
it's an IE bug.


Wrapping is also incorrect in Opera 7.23.


i have the same problem in that same version of Opera (haven't
downloaded a newer version, yet). as such, i'm somewhat trepidatious
to place the blame soley on IE.

irregardless of the source of the problem, what can be done to fix it?
adding a <br> between every 80 or so !'s would fix it, but that would
also force word wrapping on browsers that don't need it (ie. ones
running at high resolutions).

apparently replacing even one of the !'s with an 'a' brings about word
wrapping, but adding two spaces instead of one seems to do nothing.
however, that said, the former isn't a very attractive solution. any
other ideas as to a solution to this problem?

Jul 20 '05 #4

P: n/a
On Tue, 20 Apr 2004 03:39:44 GMT, yawnmoth <te*******@yahoo.com> wrote:
apparently replacing even one of the !'s with an 'a' brings about word
wrapping, but adding two spaces instead of one seems to do nothing.
however, that said, the former isn't a very attractive solution. any
other ideas as to a solution to this problem?

Try replacing one with ! and see what happens.
Jul 20 '05 #5

P: n/a
te*******@yahoo.com (yawnmoth) wrote:
word wrapping normally treats some spaces as line feeds, if there
hasn't been a line feed for quite a while. so while a string with
eighty consecutive a's might not word wrap, a space placed squarely in
the middle of that string will sorta word wrap. so why doesn't it
seem to work with !'s? here's a page that demonstrates how !'s don't
seem to word wrap:

http://www.geocities.com/terra1024/wordwrap.htm


Several browsers (IE and Opera included, but not Mozila) these days
base their line breaking on the Unicode specification. Whether this is
a smart thing to do is debatable.

http://www.unicode.org/reports/tr14/

! belongs to the EX class of characters (Exclamation/Interrogation)
which "prohibit line break before".
Spaces "generally provide a line break opportunity after the
character, enable indirect breaks"

The "prohibit line break before" trumps the "generally provide a line
break opportunity after" so no line breaks are allowed.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #6

P: n/a
Steve Pugh <st***@pugh.net> wrote:
Several browsers (IE and Opera included, but not Mozila) these days
base their line breaking on the Unicode specification.
Well, in part. They usually implement the foolish parts and add some
additional wrong line breaks.
Whether this is
a smart thing to do is debatable.


Yes, it is debatable to the extent that some people are willing to find
excuses for the absurd rules.

For details see also http://www.cs.tut.fi/~jkorpela/html/nobr.html

If you wish to _prevent_ a line break in an expression like !foo, then
the only reasonably safe way is to write <nobr>!foo</nobr>. (The only
real risk is that in distant future, browsers might drop support to this
element.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #7

P: n/a
How can i correct this Bug (WRAP) in <TABLE> TAG ??

asdfsafsdfasdfasdfsafsdfasdfasdfsafsdfasdfasdfsafs dfasdfasdfsafsdfasdfasdfsafsdfasdfasdfsafsdfasdfas dfsafsdfasdfasdfsafsdfasdfasdfsafsdfasdfasdfsafsdf asdfasdfsafsdfasdfasdfsafsdfasdfasdfsafsdfasdfasdf safsdfasdfasdfsafsdfasdfasdfsafsdfasdfasdfsafsdfas dfasdfsafsdfasdfasdfsafsd
Jul 20 '05 #8

P: n/a
/Jukka K. Korpela/:
Steve Pugh <st***@pugh.net> wrote:
Several browsers (IE and Opera included, but not Mozila) these days
base their line breaking on the Unicode specification.


Well, in part. They usually implement the foolish parts and add some
additional wrong line breaks.
Whether this is
a smart thing to do is debatable.


Yes, it is debatable to the extent that some people are willing to find
excuses for the absurd rules.


Well, I've been thinking there's real need of a more precise
line/word break hinting capabilities which could be either specified
through a style properties or with Unicode control characters. And
here goes my question: Does Unicode provide means to specify such
line/word break intention:

<div class="line-or-lines">
<span class="break-here-first">couple of words</span>
<span class="break-here-first">more words</span>
<span class="break-here-first">yet another sentence</span>
</div>

so as normal line breaks would occur between words but to break on a
whole SPAN sentence first, if it doesn't fit on the current line?

--
Stanimir
Jul 20 '05 #9

P: n/a
Stanimir Stamenkov <s7****@netscape.net> wrote:
Does Unicode provide means to specify such
line/word break intention:

<div class="line-or-lines">
<span class="break-here-first">couple of words</span>
<span class="break-here-first">more words</span>
<span class="break-here-first">yet another sentence</span>
</div>

so as normal line breaks would occur between words but to break on a
whole SPAN sentence first, if it doesn't fit on the current line?


Unicode knows nothing about HTML tags. And it does not let you specify
any levels in line break preferences. You can just prohibit, permit, or
require a line break

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #10

P: n/a
Goodwater wrote:
How can i correct this Bug (WRAP) in <TABLE> TAG ??


There isn't really a "bug" in the TABLE tag... rather, there's a
"misfeature" in line wrapping in certain browsers (whether in or out of
a TABLE element), encouraged by some (possibly misguided) parts of the
Unicode standard.

--
== Dan ==
Dan's Mail Format Site: http://mailformat.dan.info/
Dan's Web Tips: http://webtips.dan.info/
Dan's Domain Site: http://domains.dan.info/
Jul 20 '05 #11

P: n/a
/Jukka K. Korpela/:
Stanimir Stamenkov <s7****@netscape.net> wrote:
<div class="line-or-lines">
<span class="break-here-first">couple of words</span>
<span class="break-here-first">more words</span>
<span class="break-here-first">yet another sentence</span>
</div>

so as normal line breaks would occur between words but to break on a
whole SPAN sentence first, if it doesn't fit on the current line?


Unicode knows nothing about HTML tags. And it does not let you specify
any levels in line break preferences. You can just prohibit, permit, or
require a line break


O.k. I didn't meant for Unicode to understand HTML tags but if it
had some tagging characters to specify such levels in the line
breaking - thank you, for your answer.

--
Stanimir
Jul 20 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.