472,955 Members | 2,616 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,955 software developers and data experts.

Allowing lines to break at hyphens?

I've read the recent post about not breaking at hyphens in HTML documents.
I *want* breaking to occur at hyphens. (for 'hyphen' read 'minus sign')

IE6 and Opera7.54 both break phrases such as "never-to-be-forgotten" exactly
as I want but Mozilla1.7.3 and Firefox1.0 don't. The same happens with
entitites such as –
The CSS white-space: property doesn't seem to correct things.

The zero-width space entity ​ after each minus sign fixes things for
all the mentioned browsers except for IE6, which renders it as a small
square box. Does IE6 support this character entity?

The only solution I could find was to insert the following
<span style="font-size:0px"> </span>
after each hyphen. It works but it's a clumsy hack.

The easiest and neatest solution is not to hyphenate the phrase at all.
Jul 23 '05 #1
8 2636
On Mon, 15 Nov 2004, Danny@Kendal wrote:
I *want* breaking to occur at hyphens. (for 'hyphen' read 'minus sign')
Err, what?

I *want* Bush. (For 'Bush' read 'Kerry'.)

Usually, I do not want breaking after a minus sign, e.g. -273*°C.
The zero-width space entity &#x200B; after each minus sign fixes things for
all the mentioned browsers except for IE6, which renders it as a small
square box. Does IE6 support this character entity?


U+200B ​ is outside the WGL4 character set.
http://ppewww.ph.gla.ac.uk/~flavell/...unidata20.html
This means Internet Explorer in its _default_ setup is likely to fail
at this character.

--
Top-posting.
What's the most irritating thing on Usenet?

Jul 23 '05 #2
"Danny@Kendal" <da***@STOPSPAMghpkendal.co.uk> wrote:
I've read the recent post about not breaking at hyphens in HTML
documents. I *want* breaking to occur at hyphens. (for 'hyphen' read
'minus sign')
As Andreas wrote, it's illogical to say "hyphen" and mean "minus sign".
Using the Ascii hyphen-minus as a surrogate for the minus sign is
understandable (though typographically, the en dash or the em dash is a
better surrogate), but it does not _make_ it a minus sign.
IE6 and Opera7.54 both break phrases such as "never-to-be-forgotten"
exactly as I want but Mozilla1.7.3 and Firefox1.0 don't.
So do you mean hyphens, or do you mean minus signs?
The same
happens with entitites such as &ndash;
Which is neither a hyphen nor a minus sign, but could be used as a
surrogate for the latter.
The CSS white-space: property doesn't seem to correct things.
It can be used to prevent line breaks in such cases, but not explicitly
allow them.
The zero-width space entity &#x200B; after each minus sign fixes
things for all the mentioned browsers except for IE6, which renders
it as a small square box.
Which rules this approach out for most purposes in authoring for the WWW,
does it not.
Does IE6 support this character entity?
It's not an entity but a character reference. IE recognizes it but fails
to apply any specific semantics to it or even render it properly.
The only solution I could find was to insert the following
<span style="font-size:0px"> </span>
after each hyphen. It works but it's a clumsy hack.
It may work for some values of "work". How about a browser that has been
configured to use a minimum font size, for example?
The easiest and neatest solution is not to hyphenate the phrase at
all.


It's not neat at all if the correct spelling contains hyphens.

The practical method is to use the tag <wbr> after the hyphen, or dash,
or minus sign. The <wbr> tag was invented by Netscape, then adopted by
other browser vendors as well, later dropped out in Netscape, then
re-introduced. But in any case, it either does nothing, or it allows a
line break, so it's a safe hack.

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

Jul 23 '05 #3
"Andreas Prilop" <nh******@rrzn-user.uni-hannover.de> a écrit dans le
message de news:Pine.GSO.4.44.0411151534410.7398-100000@s5b004
U+200B ​ is outside the WGL4 character set.


What is the "WGL4 character set" ?

Jul 23 '05 #4
On Tue, 16 Nov 2004, Pierre Goiffon wrote:
What is the "WGL4 character set" ?


What's a search engine?

http://www.google.com/search?q=wgl4

Microsoft has now defined a character set standard which includes
characters required by Western, Central, and Eastern European writing
systems, as well as characters required by Greek and Turkish. This
"PanEuropean" character set contains 652 characters and is called
WGL4: Windows Glyph List 4.

Of course, like all vendor-defined "standards", it can change at the
vendor's whim: the original WGL4 definition is subtly different from
the current "WGL4.0" definition. Who'd have thought that .0 was
greater than nothing?
Jul 23 '05 #5
In article <41**********************@news.free.fr>,
Pierre Goiffon <pg******@nowhere.invalid> wrote:
"Andreas Prilop" <nh******@rrzn-user.uni-hannover.de> a écrit dans le
message de news:Pine.GSO.4.44.0411151534410.7398-100000@s5b004
U+200B ​ is outside the WGL4 character set.


What is the "WGL4 character set" ?


It stands for "Windows Glyph List 4" and it is a Microsoft-defined
subset of Unicode that "includes characters required by Western,
Central, and Eastern European writing systems, as well as characters
required by Greek and Turkish." More info at
http://www.microsoft.com/typography/unicode/cscp.htm .

--
= Eric Bustad, Norwegian bachelor programmer
Jul 23 '05 #6
On Mon, 15 Nov 2004 17:48:26 +0000, "Jukka K. Korpela"
<jk******@cs.tut.fi> wrote in message
<Xn*****************************@193.229.0.31>:
"Danny@Kendal" <da***@STOPSPAMghpkendal.co.uk> wrote:
I've read the recent post about not breaking at hyphens in HTML
documents. I *want* breaking to occur at hyphens. (for 'hyphen' read
'minus sign')


As Andreas wrote, it's illogical to say "hyphen" and mean "minus sign".


Maybe I should have said I use the character - to hyphenate words
rather than some other character such as &hyp; &ndash; or &mdash;

Anyway. It turns out that this is a problem with Mozilla and Mozilla-based
browsers which has been known about for centuries, or so it would seem.

<wbr> was a useful tip. Thanks.

--
FZS600 - Silver/Black
GS125 - Black/Rust
Ford 100E Prefect - Black, naturally
Whisky - Aberlour Cask Strength
Jul 23 '05 #7
"Eric Kenneth Bustad" <ek*@hos1cad.ho.att.com> a écrit dans le message
de news:cn********@netnews.proxy.lucent.com
What is the "WGL4 character set" ?

(...)

Alan, Eric, thanks very mutch for these details !

Jul 23 '05 #8
Alan J. Flavell wrote:
like all vendor-defined "standards", it can change at the
vendor's whim


Like Monopoly money, as one web page put it: useful as long as the game
is played. [I Googled for the page, but could not find it. Terms like
monopoly, money, and game are a little too common on the www. ;-) ]

--
Brian (remove "invalid" to email me)
Jul 23 '05 #9

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

Similar topics

18
by: Gustaf Liljegren | last post by:
IE does, and I can't remember this used to be a problem in Netscape. I guess someone in the Mozilla team just came up with a Smart Idea about the True Semantics of the Hyphen Minus character. :-(...
13
by: Jesse Engle | last post by:
how can i allow a user of my program to enter paragraphs seperated by line spaces using gets() or a similar function? i want the user to be able to enter as many lines as they want, while able...
37
by: Xiao Jianfeng | last post by:
Hi, I need to print a long sting, which is two long so it must expand two lines. I know that we can use backslash(\) to explicitly join two lines into a logical line, but this doesn't work for...
10
by: Tim | last post by:
hi all, I have searched for this, yet with no joy. I have the word e-commerce in an html sentence. The hyphen allows the commerce part to wrap to a new line. Yuck. Is there a no break...
2
by: patrik.nyman | last post by:
I'm doing markup of some original texts, and want to be able too optionally keep the line breaks of the original. But sometimes a word is hyphenated at a line break. At TEI-L I found the...
17
by: kevgibbo | last post by:
Hi, I'm currently having a problem where a long URL or a line of text with no spaces will break the design of a webpage, http:// blog.seoptimise.com/2007/01/how-to-add-delicious-and-digg-blog-...
19
by: Pavan | last post by:
Hi, I want to know if there is any software for measuring lines of code of my c++ application. I found out a tool, sloccount, but it gives only physical lines of code. I found out one more...
9
by: Donos | last post by:
I have a CString with 100 characters. Now i want to make that to 2 lines. For example, CString str = "This is just a test to find out how to break a cstring"; I want this CString in the...
6
by: ARC | last post by:
I know this should be simple, but in a sub-routine that's printing a large batch of reports, how do you code the routine to look for an escape key to allow the user to break out? Thanks! Andy
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
1
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.