Calibre converts lower to uppercase

Bug #1655338 reported by Gareth Thomas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

When using Jutoh to format my ebooks chapter headings are in lowercase: "Chapter". When I import them and convert them from EPUB to a AZW3 format Calibre converts the lowercase into uppercase: "CHAPTER".

I then have to DELETE this line of code from the CSS for the heading to revert back to lowercase: text-transform: uppercase;

MacBook Pro (Retina, 15-inch, Late 2013)
Processor 2.3 GHz Intel Core i7
Memory 8gb 1600 MHz DDR3
Graphics Intel Iris Pro 1536 MB

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1655338

Attach an EPUB file demonstrating/reproducing the problem to this bug report. You can do that by clicking the "Add attachment or patch" link at the bottom of the bug's page. If the file you are attaching is copyrighted, mark the bug as private. You can do this by clicking the tiny lock icon next to "This report contains Public information" in the top right area of the bug's page.

 status incomplete

Changed in calibre:
status: New → Incomplete
Revision history for this message
Gareth Thomas (gwaredd8432) wrote :

When this file is converted from EPUB to AZW3 in Calibre lowercase is converted to upper case.

Revision history for this message
Gareth Thomas (gwaredd8432) wrote :

I have since noticed that the title and the chapter headings are also converted from lowercase to UPPERCASE when converted from EPUB to AZW3. This necessitates having to manually remove this line in the CSS "text-transform: uppercase;" in order for the UPPERCASE to be converted back to lowercase.

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

This is because in your CSS stylesheet you have two rules:

.P_Chapter {
font-weight: bold;
font-style: normal;
font-size: 1.50em;
text-align: center;
margin-top: 0.00em;
margin-bottom: 5.00em;
margin-left: 0.00em;
margin-right: 0.00em;
text-indent: 0.00em;
}

.P_CHAPTER {
font-weight: bold;
font-style: normal;
font-size: 1.50em;
text-transform: uppercase;
text-align: center;
margin-top: 0.00em;
margin-bottom: 5.00em;
margin-left: 0.00em;
margin-right: 0.00em;
text-indent: 0.00em;
}

See the text-transform: uppercase in the second rule. When converting,
calibre matches class names case-insensitively, as that is what the vast
majority of documents use. Therefore, the two rules get combined leading
to what you see. In general you should never have CSS rules with
different cases for the selectors as that will lead to lots of problems
in lots of places.

 status invalid

Changed in calibre:
status: Incomplete → Invalid
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.