Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > ° - is it dependable?

Reply
Thread Tools

° - is it dependable?

 
 
still just me
Guest
Posts: n/a
 
      11-19-2007
How universal is this symbol? Can I depend on it's implementation at
all or should I just superscript a small font ?

Thanks,
 
Reply With Quote
 
 
 
 
cwdjrxyz
Guest
Posts: n/a
 
      11-19-2007
On Nov 18, 8:19 pm, still just me <(E-Mail Removed)> wrote:
> How universal is this symbol? Can I depend on it's implementation at
> all or should I just superscript a small font ?


For recent browsers, I find the named entity for the degree symbol
works on IE6, Firefox, SeaMonkey, Opera, and Safari for Windows
browers. It also works on the W3C Amaya browser and a simulator for
the old MSNTV box.

For older browsers Appendix C: Special Characters, Powell's HTML &
XHTML, 4th ed. supplies the following support data:

Netscape: 3 to 7;
IE: 3 to 6;
Opera: 4.02 to 7;
MSNTV (this is for the Bowser browser in the old WebTV set top box.
The fairly new MSNTV box uses a watered down IE6 browser.)

One can instead use a numbered entity with the number being 176. This
works for the same browsers as the named entity with the addition of
support for Netscape 1 and 2. About the only ones who would have
Netscape 1 or 2 are collectors of antique browsers. About a year ago,
and likely still, there was a site I found for downloading antique
Netscape browsers. If something is old, there usually are at least a
few people who will want to collect it.

 
Reply With Quote
 
 
 
 
Toby A Inkster
Guest
Posts: n/a
 
      11-19-2007
cwdjrxyz wrote:

> For recent browsers, I find the named entity for the degree symbol
> works on IE6, Firefox, SeaMonkey, Opera, and Safari for Windows
> browers. It also works on the W3C Amaya browser and a simulator for
> the old MSNTV box.


It's worth noting that for XHTML, decimal character references are
normally preferable to named entities. This is because non-validating XML
parsers (including most web browsers) do not process the file's DTD, which
is where entities (except for the five predefined XML entities: &amp; &lt;
&gt; &quot; &apos are defined.

In practice, most browsers do have workarounds which apply their
knowledge of HTML entities to XHTML, but it's a bad idea to rely on
browser workarounds.

For an example of a browser which *doesn't* do this workaround, take a
look at an XHTML file (sent with an XML MIME type) in Opera 6.0. Named
entities such as &deg; are not understood. But if you send the file with
an HTML MIME type, the entities magically come to life. This is not a bug:
in fact, it's being too strict for its own good! This behaviour was
changed in Opera 7.0.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 12 days, 15:42.]

USD/EUR Exchange Rate Graph
http://tobyinkster.co.uk/blog/2007/11/18/usd-eur/
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      11-19-2007
Scripsit still just me:

> How universal is this symbol?


Which "this symbol"? It's poor style and poor communication to refer to a
heading in copy text.

The notation &deg; is not really a symbol but a notation, an entity
reference. Did you mean to ask about the entity reference, or about the
DEGREE SIGN character ()? There's normally no reason to use the entity
reference in HTML authoring, since DEGREE SIGN is part of the iso-8859-1
character repertoire, and you probably use (or can use) the iso-8859-1
encoding.

> Can I depend on it's implementation at
> all or should I just superscript a small font ?


A browser that does not get the DEGREE SIGN right, whether it is included as
such in the encoding used or written as an entity reference, is so broken
that it makes little sense to try to cover such browsers. The only thing I
might really be worried about is that speech or Braille rendering might have
difficulties with it.

But your question "should I just superscript a small font" suggests that
your real question might not have anything to do with the degree sign, which
is _not_ a superscript. Specifically, it is _not_ superscript 0 (zero), it
is _not_ superscript o, and it is _not_ masculine ordinal indicator as used
e.g. in Spanish (e.g., 1 = primero), even though it may, by chance, look
much the same or identical.

So where would you use &deg;? This is correct usage:
45&deg; angle
32 &deg;C (= 32 degrees centigrade)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
still just me
Guest
Posts: n/a
 
      11-20-2007
On Mon, 19 Nov 2007 08:53:11 +0000, Toby A Inkster
<(E-Mail Removed)> wrote:

>cwdjrxyz wrote:
>
>> For recent browsers, I find the named entity for the degree symbol
>> works on IE6, Firefox, SeaMonkey, Opera, and Safari for Windows
>> browers. It also works on the W3C Amaya browser and a simulator for
>> the old MSNTV box.

>
>It's worth noting that for XHTML, decimal character references are
>normally preferable to named entities. This is because non-validating XML
>parsers (including most web browsers) do not process the file's DTD, which
>is where entities (except for the five predefined XML entities: &amp; &lt;
>&gt; &quot; &apos are defined.
>
>In practice, most browsers do have workarounds which apply their
>knowledge of HTML entities to XHTML, but it's a bad idea to rely on
>browser workarounds.
>
>For an example of a browser which *doesn't* do this workaround, take a
>look at an XHTML file (sent with an XML MIME type) in Opera 6.0. Named
>entities such as &deg; are not understood. But if you send the file with
>an HTML MIME type, the entities magically come to life. This is not a bug:
>in fact, it's being too strict for its own good! This behaviour was
>changed in Opera 7.0.


Thanks all.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments