Forum moved here!

Home / Trademark symbol displayed as a rectangle in EPUB

1112

Symbol ™ error, it is rectangle instead of symbol:

image

SumatraPDF-prerel-13104-64-install

SumatraPeter

I’m guessing it’s the same UTF-8/Unicode issue I first faced many years ago, but if you can share your EPUB then we can confirm.

Edit: Nope, not the same issue (see below).

GitHubRulesOK

UTF Font support is to a large degree governed by the default font characters, as set in advanced settings (normally Georgia)

Windows 10 Arial may work better for most english books.

For other languages characters you may need a different choice.

1112

<p class="copyright">McGraw-Hill, the McGraw-Hill Publishing logo, The Complete Reference&#153;,

EbookUI [
	FontName = Courier
	FontSize = 12.5
	TextColor = #5f4b32
	BackgroundColor = #fbf0d9
	UseFixedPageUI = true
]

The book is Powell Thomas, Schneider Fritz. Javascript The Complete Reference, 2012.

GitHubRulesOK

I suggest they fire their proof reader since ™ clearly works on other pages and the proof reader did not see it missing on that page but then the file looks like it may not be the source file, so we may even need to blame a translator. No choice of Unicode font can fix that error.

Whatever &#153; is not a UTF8/Unicode font character such as ™
It is a unsupported HTML code &#153;=� now universally written as &#8482;=™
Most browsers should now show code 153 as a Diamond with internal ? but using via numpad the ALT ASCII code ALT + 0153 you can generate ™

SumatraPeter

Not necessarily; read on to know why. :slight_smile:

Since Discourse supports HTML, here’s what I typed in:

<p>1. This is the trademark symbol: "&#153;"</p>
<p>2. This is the trademark symbol: "&#x99;"</p>
<p>3. This is the trademark symbol: "&#8482;"</p>
<p>4. This is the trademark symbol: "&#x2122;"</p>
<p>5. This is the trademark symbol: "&trade;"</p>
<p>6. This is the trademark symbol: "&TRADE;"</p>
<p>7. This is the trademark symbol: "™"</p>

(153dec = 99hex and 8482dec = 2122hex)

And this is what it looks like in your current browser:

1. This is the trademark symbol: "™"

2. This is the trademark symbol: "™"

3. This is the trademark symbol: "™"

4. This is the trademark symbol: "™"

5. This is the trademark symbol: "™"

6. This is the trademark symbol: "™"

7. This is the trademark symbol: "™"

As mentioned on this W3Schools page:

ISO-8859-1 and Windows-1252

ISO-8859-1 is very similar to Windows-1252.

In ISO-8859-1, the characters from 128 to 159 are not defined.

In Windows-1252, the characters from 128 to 159 are used for some useful symbols.

Since many web sites declare ISO-8859-1 and use the values from 128 to 159 as if they were using Windows-1252, most browsers will display these characters from the Windows-1252 character set instead of nothing.

Since I’m on a Windows (10) PC currently, this is why &#153; / &#x99; are successfully displayed as the trademark symbol by both Firefox and ChrEdge for me. So I see 7 trademark symbols in total above; how about you?

Now it’s obviously best not to rely on such OS-specific quirks, so instead of using &#153; / &#x99; from the “Latin-1 Supplement” Unicode Block one should use either &#8482; / &#x2122; from the “Letterlike Symbols” Unicode Block, or the &trade; / &TRADE; HTML character entities.

The EPUB format dictates the use of UTF-8 or UTF-16 character encoding only, so technically speaking IMO a standards-conforming EPUB reader shouldn’t use Windows-1252 to display &#153; / &#x99; as the trademark symbol, even on Windows. Sumatra thus seems to be working properly in this regard.

P.S. I don’t know why, but on my Win10 PC Sumatra 3.2 and prerel-13105 both simply fail to display anything for &#153; / &#x99; (no rectangle or even an empty space!).

GitHubRulesOK

OK I see it is the surroundings that dictate the translation so using exactly the same inline code but differing coding styles
=&#153;
=“�”

=™

SumatraPeter

In Discourse, yes. Since it supports Markdown, BBCode and HTML, it needs the appropriate tags to know how to treat what the user has typed.