3
<span style="font-family:Symbol; font-size:10pt; color:#000000">&#212;</span><span style="font-family:MS Sans Serif; font-size:10pt; color:#000000">

Above is the HTML code for the trademark symbol that a fellow developer created. Unfortunately, they used this character sequence &#212 to create a trademark symbol for the program name. I'm under the impression this character sequence will most likely produce this character: Ô.

However, the sequence
- Shows up correctly in Chrome as a TM.
- Shows up INCORRECTLY in Safari as this symbol: Ô
- Shows up INCORRECTLY in Firefox as this symbol: Ô

Why does this symbol show up correctly in Google Chrome compared to the other browsers? I assume this has to do with how each parses different character sequences, but I'm just confused as to why Chrome would have it show up correctly and ignore the usual character sequence symbol Ô.

Question: Is this the best character sequence to use for a trademark symbol for use in HTML pages? Or are there other more common trademark symbol character sequences used?

Thanks!

EDIT: Found DOCTYPE at the top of one of the HTML pages, not sure if it will make a different or not.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
CODe
  • 2,253
  • 6
  • 36
  • 65
  • 1
    What encoding is your page in? Ô seems to be correct for the ISO-8859-1 character set. – Pekka Nov 07 '12 at 20:52
  • See edit on question. Only encoding information I see is this line: – CODe Nov 07 '12 at 20:54
  • Check out which character set is selected in the browser's menu. Do they match for FF, Chrome and Safari? – Pekka Nov 07 '12 at 20:57
  • Safarai: default. Can't find anything for Chrome. Firefox is set to Western (ISO-8859-1). My real question, is this the best trademark sequence to use for HTML web pages? – CODe Nov 07 '12 at 21:01
  • @Pekka Even with Firefox set to ISO-8859-1, the sequence still shows up as Ô symbol. (circular symbol with ^ on top) – CODe Nov 07 '12 at 21:03

2 Answers2

4

Use the HTML entity &trade; (in a normal font instead of Symbol). This maps to &#8482;, but the named entity is widely supported.

Alternatively, use UTF-8 encoding for your HTML and embed the symbol directly, as suggested in the answers to this question.

Community
  • 1
  • 1
Matthew Strawbridge
  • 19,940
  • 10
  • 72
  • 93
  • The first answer, using ™ and changing the font family to Sans Serif made the trademark symbol appear correctly in every browser I tested on. Looks like this is the fix, thanks! – CODe Nov 07 '12 at 21:37
3

The character reference &#212; unambiguously denotes the character “Ô” U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX. This does not depend on the doctype declaration or on the character encoding. Thus, browsers that display it as something else behave erroneously.

The use of the Symbol font is an old trick that relies on browser bugs. The Symbol font is a kludge where characters have been replaced by various symbols in a rather arbitrary way. The font contains two variants of the trademark symbol, a serif version in code position D4 (hex.) and a sans-serif version on code position E4. (The code tries to use the serif version in an apparently sans-serif environment.) It’s a really old trick, discussed and criticized well as early as in the 1990s in Alan Flavell’s Using FONT FACE to extend repertoire?

There are several alternative ways to present the correct character U+2122 TRADE MARK SIGN on a web page. No font trickery is needed, and the character should be rendered in the same font as the surrounding text; this happens automatically if you don’t do anything special.

The ways are:

  1. Writing the character itself (™). This is possible, using a decent editor, if the document encoding is UTF-8 or windows-1252, for example.
  2. Using the hexadecimal character reference &#x2122; or the decimal character reference &#8482;. These work independently of character encoding, but they make HTML source a bit cryptic.
  3. Using the entity reference &trade;. This is more mnemonic and works independently of character encoding. In theory, it is not safe in XHTML, though.
Jukka K. Korpela
  • 195,524
  • 37
  • 270
  • 390
  • I appreciate the additional information, especially since I was interested in why using the Symbol font along with that sequence resulted in the correct TM result. – CODe Nov 07 '12 at 23:00