Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4676137
Votes 0
Synopsis The entity & #151; does not print as emdash
Category customdoclets:mifdoclet
Reported Against 1.2beta1
Release Fixed 1.2beta2
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs
Submit Date 27-APR-2002
Description
In the package.html files, I find if I use the code for the emdash, "—",
then the string "—" gets rendered--that is, it does not print an emdash. 
Have you encountered this before?
 xxxxx@xxxxx 

How do I get an emdash into the output. — If I put this escape sequence 
in one of my html files it looks fine in a browser but the mifdoclet does not 
recognize it.
 xxxxx@xxxxx 
Work Around





======================================================================
Evaluation
The justification for — being used for an em-dash comes from
two sources:

- ANSI table defines 151 to be an em-dash (and 150 to be en-dash)
    http://www.fingertipsoft.com/3dkbd/ansitable.html
- Dreamweaver inserts — when inserting an em-dash

 xxxxx@xxxxx  2002-06-13

We have a hand-built HTML parser that we add entities to by request.
Currently, the only entities we support are:

            &lt;                     less than (<)
            &gt;                     greater than (>)
            &amp;                    ampersand (&)
            &nbsp;                   non-breaking space
            &reg;                    registered trademark
            &copy;                   copyright

As documented at:
http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html#mappingofhtmltags

We can define others, but would prefer to use the text name rather than
the number, because it's more readable, such as "&emsp;" rather than "&#8195;". 
(We could implemetn the number as well.)

The HTML 4.0 spec defines the following entities for dashes and spaces,
minus sign and plus/over/minus sign and other common characters.
I propose we add all of these.  Are there any others you might need?

   <!ENTITY ensp    CDATA "&#8194;" -- en space, U+2002 ISOpub -->
   <!ENTITY emsp    CDATA "&#8195;" -- em space, U+2003 ISOpub -->
   <!ENTITY thinsp  CDATA "&#8201;" -- thin space, U+2009 ISOpub -->
   <!ENTITY ndash   CDATA "&#8211;" -- en dash, U+2013 ISOpub -->
   <!ENTITY mdash   CDATA "&#8212;" -- em dash, U+2014 ISOpub -->

   <!ENTITY times   CDATA "&#215;"  -- multiplication sign, U+00D7
ISOnum -->
   <!ENTITY divide  CDATA "&#247;"  -- division sign, U+00F7 ISOnum -->
   <!ENTITY minus   CDATA "&#8722;" -- minus sign, U+2212 ISOtech
-->                  
   <!ENTITY plusmn  CDATA "&#177;"  -- plus-minus sign = plus-or-minus
sign, U+00B1 ISOnum -->

   <!ENTITY cong    CDATA "&#8773;" -- approximately equal to, U+2245
ISOtech -->
   <!ENTITY equiv   CDATA "&#8801;" -- identical to, U+2261 ISOtech -->
   <!ENTITY ne      CDATA "&#8800;" -- not equal to, U+2260 ISOtech -->
   <!ENTITY le      CDATA "&#8804;" -- less-than or equal to, U+2264
ISOtech -->
   <!ENTITY ge      CDATA "&#8805;" -- greater-than or equal to, U+2265
ISOtech -->
   <!ENTITY prop    CDATA "&#8733;" -- proportional to, U+221D ISOtech
-->

   <!ENTITY infin   CDATA "&#8734;" -- infinity, U+221E ISOtech -->
   <!ENTITY bull    CDATA "&#8226;" -- bullet = black small circle,
U+2022 ISOpub  -->
   <!ENTITY hellip  CDATA "&#8230;" -- horizontal ellipsis = three dot
leader, U+2026 ISOpub -->
   <!ENTITY deg     CDATA "&#176;"  -- degree sign, U+00B0 ISOnum -->

These correspond to FrameMaker characters:

ensp    
emsp
thinsp
ndash
mdash

times
divide
minus
plusmn

cong
equiv
ne
le      \xa3
ge
prop

infin
bull
hellip
deg

 xxxxx@xxxxx  2002-04-27

I fixed & #150; to be en dash and & #151; to be em dash.
Also, & #8212; works and has worked for some time.  
 xxxxx@xxxxx  2002-06-13
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang