The E-book viewer displays a CSS inserted em dash as an encoding error

Bug #2021554 reported by bbballs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

Calibre 6.18.1
Linux POP!_OS 22.04

The E-book viewer displays a CSS inserted em dash as an encoding error, but the E-book editor preview displays the em dash correctly.

An example of the HTML:

    <span class="blurb-label">
    <span class="blurb-item translated-title">The Chapter on the Entire Spectrum of Ethics </span>
    <span class="blurb-item root-title">Sīlakkhandhavagga</span>
    </span>

The relevant css:

    .blurb-item.translated-title::after
    {
        content: ' — ';
    }

The E-book viewer output:

    The Chapter on the Entire Spectrum of Ethics — Sīlakkhandhavagga

The E-book editor preview output:

    The Chapter on the Entire Spectrum of Ethics — Sīlakkhandhavagga

Revision history for this message
bbballs (bbballs) wrote :
Revision history for this message
Kovid Goyal (kovid) wrote :

Works for me with

test.html
```
<!DOCTYPE html>
<html>
    <head>
        <title>test</title>
        <meta charset="utf-8" />
    </head>
    <body>
<style> .blurb-item.translated-title::after
    {
        content: ' — ';
} </style>
            <span class="blurb-label">
    <span class="blurb-item translated-title">The Chapter on the Entire Spectrum of Ethics </span>
    <span class="blurb-item root-title">Sīlakkhandhavagga</span>
    </span>
    </body>
</html>
```

ebook-viewer test.html

On Linux, current calibre.

Changed in calibre:
status: New → Invalid
Revision history for this message
bbballs (bbballs) wrote :

Hmmm, the test HTML worked for me as well. The em dash in book itself doesn't display correctly in the E-book viewer though.

The bit of HTML and CSS I provided above was what I assumed the the origin of problem was, but obvious it isn't. I tested more of the surrounding HTML and CSS of the example text in isolation, and it worked as well. This basically exhausts my capacity to try to identify what is happening.

The organization the produces the EPUB provides the document as an HTML file as well. The HTML version displays the em dash correctly in the E-Book viewer, so something is happening differently with the EPUB.

Here is link to the EPUB, in case you are interested in investigating further. The relevant file is the blurbs.xhtml, and the relevant chapter is "Summary of Contents".

https://github.com/suttacentral/editions/raw/main/en/sujato/dn/epub/Long-Discourses-sujato-2023-05-29.epub

Here is the link to the HTML file, in case it is relevant.

https://raw.githubusercontent.com/suttacentral/editions/main/en/sujato/dn/html/Long-Discourses-sujato-2023-05-29.html

Revision history for this message
Kovid Goyal (kovid) wrote :

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

Changed in calibre:
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.