473,699 Members | 3,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Breaking hyphen in Mozilla and an IE display problem

1) I want to show a breaking hyphen in Mozilla 1.5.0.4

How do I do that?

"Unicode standard annex #14", <http://www.unicode.org/reports/tr14/>,
defines 4 breaking hyphens.

<quote>
Breaking hyphens establish explicit break opportunities
immediately after each occurrence.

058A ARMENIAN HYPHEN
2010 HYPHEN
2012 FIGURE DASH
2013 EN DASH
</uote>

Mozilla won't display the first of these but I don't mind that. I have
tried the other 3 but my document doesn't break. What am I doing wrong?
I am currently using 2013.

Here is the document. Excuse the adverts.
<http://www.ourrights.0 catch.com/Toxicity.Compar ison_Addiction. 99,p686.(2004)-3.htm#table1>

In other words, I want Mozilla to break the line in the same place that
IE does.

2) With IE 6.0.2900, the table column's 9 and 10 are not always
separated with a gray line (on lines 8 and 12). What is wrong here?

Jun 5 '06 #1
4 4552
Rubin wrote:
1) I want to show a breaking hyphen in Mozilla 1.5.0.4

How do I do that?


Mozilla apparently doesn't support 'soft' hyphens. See (e.g.) here:
http://forums.mozillazine.org/viewto...0a3d1e4699c195

The specs for HTML 4.0 and HTML 4.01 are vague on whether this omission
is properly described as a bug; they describe what browsers that support
the soft hyphen *must* do, but they don't say that they *must* support it.

It seems that a 2007 release of Gecko may fix the problem, which has
been outstanding since [gasp!] 1999.

--
Jack.
Jun 5 '06 #2
On Mon, 5 Jun 2006, Rubin wrote:
1) I want to show a breaking hyphen in Mozilla 1.5.0.4
As I understand it, you want Moz. (and presumably other browsers too)
to take advantage of a break opportunity after the hyphen.

You don't want the semantics of the soft-hyphen ­ (which is poorly
supported, even if you /did/ want it...) - right?
How do I do that?
Sadly, the answer isn't a simple one.
<quote>
Breaking hyphens establish explicit break opportunities
immediately after each occurrence.

058A ARMENIAN HYPHEN
2010 HYPHEN
2012 FIGURE DASH
2013 EN DASH
</uote>

Mozilla won't display the first of these but I don't mind that. I
have tried the other 3 but my document doesn't break. What am I
doing wrong?


I don't think you're doing anything wrong. Mozilla isn't supporting
this.

In theory, you could resolve the problem by placing a zero-width space
U+200B (​ if you want a decimal character reference) anywhere
you want to offer a break opportunity. Indeed this works with Moz,
and does no harm with (e.g) Opera or MSIE (provided you're not using
a monospaced font!).

Unfortunately, some browser/versions don't understand what that is,
and will display an ugly glyph (their missing-character indicator) in
its place.

A practical way out may be to use the proprietary <wbr> markup. It'll
cause the document to fail validation against W3C DTDs, of course; but
those browsers that don't explicitly understand it will apply standard
HTML error recovery from unknown tags, producing the desired result.
Only you (or whoever sets the specifications for what you do) can
decide whether this workaround is permissible; but in practical terms
I've never heard of it not giving its impression of working.

h t h
Jun 5 '06 #3
On Mon, 5 Jun 2006 20:11:54 +0100, "Alan J. Flavell"
<fl*****@physic s.gla.ac.uk> wrote:
On Mon, 5 Jun 2006, Rubin wrote:
1) I want to show a breaking hyphen in Mozilla 1.5.0.4


As I understand it, you want Moz. (and presumably other browsers too)
to take advantage of a break opportunity after the hyphen.

You don't want the semantics of the soft-hyphen ­ (which is poorly
supported, even if you /did/ want it...) - right?
How do I do that?


Sadly, the answer isn't a simple one.
<quote>
Breaking hyphens establish explicit break opportunities
immediately after each occurrence.

058A ARMENIAN HYPHEN
2010 HYPHEN
2012 FIGURE DASH
2013 EN DASH
</uote>

Mozilla won't display the first of these but I don't mind that. I
have tried the other 3 but my document doesn't break. What am I
doing wrong?


I don't think you're doing anything wrong. Mozilla isn't supporting
this.

In theory, you could resolve the problem by placing a zero-width space
U+200B (​ if you want a decimal character reference) anywhere
you want to offer a break opportunity. Indeed this works with Moz,
and does no harm with (e.g) Opera or MSIE (provided you're not using
a monospaced font!).

Unfortunatel y, some browser/versions don't understand what that is,
and will display an ugly glyph (their missing-character indicator) in
its place.

A practical way out may be to use the proprietary <wbr> markup. It'll
cause the document to fail validation against W3C DTDs, of course; but
those browsers that don't explicitly understand it will apply standard
HTML error recovery from unknown tags, producing the desired result.
Only you (or whoever sets the specifications for what you do) can
decide whether this workaround is permissible; but in practical terms
I've never heard of it not giving its impression of working.


Thanks,

I replaced my hyphens with -<wbr>

Jun 5 '06 #4
Alan J. Flavell <fl*****@physic s.gla.ac.uk> scripsit:
As I understand it, you want Moz. (and presumably other browsers too)
to take advantage of a break opportunity after the hyphen.
According to the Unicode standard, both the good old Ascii hyphen (Unicode
name: hyphen-minus) and the Unicode hyphen allow a line break after them,
with some limitations. In this sense, you could simply use "-" or ߚ.
However, in addition to lack of universal browser support to this idea, such
support is not _required_ in published specifications.

HTML specifications do not require that browsers conform to the Unicode
standard. The specs use Unicode (or, more exactly, ISO 10636) to define the
document character set, but this does not include a conformance requirement.
(Moreover, conformance requirements do not say that all the defined
semantics of characters be obeyed.)

There is no explicit statement in HTML specs about a break opportunity after
a hyphen. HTML 2.0 referred to such a thing as an _allowed_ behavior. HTML
4.01 says that the "plain hyphen" (i.e., Ascii hyphen) is "should be
interpreted by a user agent as just another character". This might even be
read as saying that it be treated as a graphic character with no line
breaking opportunities, but this is hardly the intention. Rather, the issue
is left open.
( http://www.w3.org/TR/REC-html40/stru...ml#hyphenation )
A practical way out may be to use the proprietary <wbr> markup.


Indeed. But there's the opposite problem, too. Internet Explorer and some
other browsers treat the Ascii hyphen as _always_ allowing a line break
after it, even in a context like -1 (which looks rather bad with the lone
"-" at the end of a line and "1" at the start of the next line). In the
special case where an Ascii hyphen is really meant to act as a minus sign,
there's thus a good reason to use the minus sign instead, e.g. writing
&minus;1 (which is rather well supported, won't be broken into two lines,
looks typographically better, and makes things clearer).

In a more general case, to prevent an undesired line break in, say, -a,
there are several options, but the practical approaches are the nonstandard
markup
<nobr>-a</nobr>
and the use of CSS, e.g. using markup
<span class="nobr">-a</span>
with CSS code
..nobr { white-space: nowrap; }

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Jun 5 '06 #5

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

Similar topics

76
15128
by: Zenobia | last post by:
How do I display character 151 (long hyphen) in XHTML (utf-8) ? Is there another character that will substitute? The W3C validation parser, http://validator.w3.org, tells me that this character and the ones around it are illegal - then, after resubmission it flags no errors. So, are there any illegal characters between 0 and 255 in the UTF-8 character set or is it just my imagination that the W3C validation parser thinks there are -...
20
3534
by: RobG | last post by:
I'm messing with getPropertyValue (Mozilla et al) and currentStyle (IE) and have a general function (slightly modified from one originally posted by Steve van Dongen) for getting style properties: function GetCurrentStyle( el, prop ) { if ( window.getComputedStyle ) { // Mozilla et al return window.getComputedStyle(el, '').getPropertyValue(prop) ); } // IE5+ else if ( el.currentStyle ) {
87
6407
by: Frances Del Rio | last post by:
is there a non-breaking hyphen in HTML?? for example, so a phone no. falls all on one line.. as in.. 1-800-444-5454... (and is not broken into two lines if phone no. occurs near end of a line..) (searched for 'hyphen' in FAQ pg, didn't find anything..) thank you.. Frances
27
31412
by: The Bicycling Guitarist | last post by:
Hi. I found the following when trying to learn if there is such a thing as a non-breaking hyphen. Apparently Unicode has a ‑ but that is not well-supported, especially in older browsers. Somebody somewhere said: Alternately, you can use CSS to declare a class having: ..nowrap { white-space:nowrap } .... and then wrap the compound word in a <span class=nowrap></span> tag (or any other suitable inline tag). You can also try {...
22
8004
by: stevenkobes | last post by:
If a word has a hyphen in it, IE will permit a line break at the hyphen, but Firefox/Mozilla won't. Apparently the Firefox behavior is standards-compliant, but it is not what I want. Is there a way to denote a hyphen in HTML, that the line can be broken after? I've read some stuff about soft hyphens and non-breaking hyphens, but those seem like the opposite of what I'm looking for. I want a normal hyphen, that always appears, and I...
0
2311
by: Andreas Prilop | last post by:
It seems to me that Internet Explorer 7 (as opposed to IE6) displays the non-breaking-hyphen U+2011 or ‑ as some sort of dash rather than a hyphen. See U+2011 #8209 at http://www.alanflavell.org.uk/unicode/unidata20.html#x2010 http://niwo.mnsys.org/saved/~flavell/unicode/unidata20.html http://www.cs.tut.fi/~jkorpela/dashes.html#unidash My test page is
0
8633
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
9055
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8947
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,...
0
8902
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6552
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
4392
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
4642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3076
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2016
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.