Breaking hyphen in Mozilla and an IE display problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

1) I want to show a breaking hyphen in Mozilla

How do I do that?

"Unicode standard annex #14", < ,
defines 4 breaking hyphens.

    Breaking hyphens establish explicit break opportunities
    immediately after each occurrence.

    2010    HYPHEN
    2012    FIGURE DASH
    2013    EN DASH

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.
<,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?

Re: Breaking hyphen in Mozilla and an IE display problem

Rubin wrote:
Quoted text here. Click to load it

Mozilla apparently doesn't support 'soft' hyphens. See (e.g.) here:

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.


Re: Breaking hyphen in Mozilla and an IE display problem

On Mon, 5 Jun 2006, Rubin wrote:

Quoted text here. Click to load it

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 &shy; (which is poorly
supported, even if you /did/ want it...) - right?

Quoted text here. Click to load it

Sadly, the answer isn't a simple one.

Quoted text here. Click to load it

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

In theory, you could resolve the problem by placing a zero-width space
U+200B (&#8203; 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

Re: Breaking hyphen in Mozilla and an IE display problem

On Mon, 5 Jun 2006 20:11:54 +0100, "Alan J. Flavell"

Quoted text here. Click to load it


I replaced my hyphens with -<wbr>

Re: Breaking hyphen in Mozilla and an IE display problem

Quoted text here. Click to load it

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 &#2010;.
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.
( )

Quoted text here. Click to load it

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
and the use of CSS, e.g. using markup
<span class="nobr">-a</span>
with CSS code
.nobr { white-space: nowrap; }


Site Timeline