473,729 Members | 2,328 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

word wrapping

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
11 5603

"yawnmoth" <te*******@yaho o.com> wrote in message
news:a0******** *************** ***@posting.goo gle.com...
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
On Mon, 19 Apr 2004 17:40:23 -0400, Harlan Messinger
<h.*********@co mcast.net> wrote:

"yawnmoth" <te*******@yaho o.com> wrote in message
news:a0******** *************** ***@posting.goo gle.com...
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
On Mon, 19 Apr 2004 21:59:55 -0400, Neal <ne*****@spamrc n.com> wrote:
On Mon, 19 Apr 2004 17:40:23 -0400, Harlan Messinger
<h.*********@c omcast.net> wrote:

"yawnmoth" <te*******@yaho o.com> wrote in message
news:a0******** *************** ***@posting.goo gle.com...
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
On Tue, 20 Apr 2004 03:39:44 GMT, yawnmoth <te*******@yaho o.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
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
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
How can i correct this Bug (WRAP) in <TABLE> TAG ??

asdfsafsdfasdfa sdfsafsdfasdfas dfsafsdfasdfasd fsafsdfasdfasdf safsdfasdfasdfs afsdfasdfasdfsa fsdfasdfasdfsaf sdfasdfasdfsafs dfasdfasdfsafsd fasdfasdfsafsdf asdfasdfsafsdfa sdfasdfsafsdfas dfasdfsafsdfasd fasdfsafsdfasdf asdfsafsdfasdfa sdfsafsdfasdfas dfsafsdfasdfasd fsafsdfasdfasdf safsd
Jul 20 '05 #8
/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
Stanimir Stamenkov <s7****@netscap e.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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5296
by: nimdez | last post by:
Hi, I am working on an existing code base in which a lot of data displayed to the user is formatted in tables. Most tables are printed row-by-row using printf() with "%s" print conversion specification for each column (e.g. printf(%10s %25s %15s\n", pszCol1, pszCol2, pszCol3)). My problem is that when a string is longer the column's width, it overflows the column and takes the table out of alignment. What I want it to do is word-wrap...
11
6077
by: name | last post by:
Here is a first attempt at a line/word wrapping utility. Seems to work okay, but lacks some checking stuff, etc. --------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h>
10
2329
by: Douglas G | last post by:
I've tried various ideas on this problem, but I don't see word wrapping. Can you point out what is wrong? It's a K&R exercise, and I'm still new to programming. Other pointers would be helpful too. #include "header.h" /* does the wordwrapping */ void fold(char buffer, int len) {
10
23316
by: Jeff B. | last post by:
Has anyone come across a decent algorithm for implementing word wrap features in .net printing? I have a small component that uses basic printing techniques (i.e. e.Graphics.DrawString in a PrintPage event of a PrintDocument object) to send some formatted text to the printer. However, if the lines are too long they run off the page rather than wrapping around. I'm sure I can spend the time and come up with a word wrapping algorithm but...
0
969
by: Brian Conway | last post by:
Anyone know how to turn off word wrapping on the datagrid. I have gone into Property Builder and shut it off there, however, it is still wrapping. Any help would be appreciated.
10
72694
by: Lorenzo Thurman | last post by:
I have a table cell that I want to wrap text inside of. I've tried both hard and soft wrap, but Firefox refuses to obey. IE 6&7 handle the wrap just fine. Does anyone know how I can fix this?
1
1377
by: MikeY | last post by:
Hi Everyone, How do I stop my word wrapping with in my .Net Evironment.. While coding away, I pressed "something" and I lost my horizontal scroll bar, and now all my code has been word wrapped to the next line. I know there is a solution but can't find it under options Txs MikeY
1
2900
by: =?Utf-8?B?c3VydHVyeg==?= | last post by:
Hi, I'm using VB2005 + Office XP Enterprise. If you create a Word.Application object, you risk a memory leak if your application crashes because Word.Application is an unmanaged COM Interop object. I want to encapsulate the Word.Application in a Class that implements IDisposable to avoid this potential memory leak. Here is the code I have:
2
1595
by: AnilM823 | last post by:
Hi all, I'm working on designing a forum. I'm using PHP, with a mysql database, displaying the user-input results in a formatted table. Pretty standard. My questions concerns word wrapping. Normally, when the data reached the end of the table, it'll wrap to the next line. However, when people post links, the link itself will not wrap around (as it is all basically one word) and will cut right through the table's border, completely...
0
8921
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8763
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9202
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4528
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2683
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.