Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-11-2020, 02:13 PM   #1
michaelbr
Connoisseur
michaelbr began at the beginning.
 
michaelbr's Avatar
 
Posts: 77
Karma: 10
Join Date: Aug 2010
Location: Murcia/Spain
Device: Android 12
newbie: weird char display problem

I have an epub2 file, which displays fine with Foliate on Linux, but on Moon+Reader on Android, displays weird char for single quote. Sigil tells me that the encoding and charset are both UTF-8. How can i go to fix this problem? I tried to change it to ISO-8859-1 (I saw in the internet that this sometime fix the problem), but not in my case.
michaelbr is offline   Reply With Quote
Old 11-11-2020, 03:27 PM   #2
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
It sounds like the font is missing that glyph. Try using a different font and see what happens, e.g., one from google.
hobnail is offline   Reply With Quote
Advert
Old 11-12-2020, 01:12 AM   #3
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by michaelbr View Post
I have an epub2 file, [...] displays weird char for single quote. Sigil tells me that the encoding and charset are both UTF-8. How can i go to fix this problem?
I'm betting it's a character that looks like an apostrophe, but isn't.

Many times, people accidentally use ` GRAVE ACCENT (the little key to the left of '1') instead of ‘ LEFT SINGLE QUOTE.

Code:
This is an `example´ of grave and acute accent. (Wrong)
This is an ‘example’ of left and right single quote. (Correct)
It should just be as easy as copying the character that's funny and Search/Replacing it with the proper character:

Grave -> Left Single Quote

Search: `
Replace:

Acute -> Right Single Quote

Search: ´
Replace:

To Spot Other Strange Characters

In Sigil, Press Tools > Reports > Characters in HTML Files.

Scroll through the list, and look for anything that looks like a "weird" apostrophe.

Then you could double-click on a character in the list, and Sigil should jump you to its location in the code.

These 3 are correct:
  • ' APOSTROPHE (U+0027)
    • This is the key on your keyboard.
  • ‘ LEFT SINGLE QUOTE (U+2018)
  • ’ RIGHT SINGLE QUOTE (U+2019)

If dealing with double quotes, these 3 are correct too:
  • " QUOTATION MARK (U+0022)
    • This is the key on your keyboard.
  • “ LEFT DOUBLE QUOTE (U+201C)
  • ” RIGHT DOUBLE QUOTE (U+201D)

Any other quote-looking characters should probably be inspected.

Last edited by Tex2002ans; 11-12-2020 at 01:17 AM.
Tex2002ans is offline   Reply With Quote
Old 11-13-2020, 03:41 AM   #4
michaelbr
Connoisseur
michaelbr began at the beginning.
 
michaelbr's Avatar
 
Posts: 77
Karma: 10
Join Date: Aug 2010
Location: Murcia/Spain
Device: Android 12
Thanks all for your reply, I'll try out your suggestions during this weekend to see if it'll fix the problem.
@Tex2002ans, thanks for the tips for Sigil, learned something new today.
michaelbr is offline   Reply With Quote
Old 11-15-2020, 02:28 PM   #5
michaelbr
Connoisseur
michaelbr began at the beginning.
 
michaelbr's Avatar
 
Posts: 77
Karma: 10
Join Date: Aug 2010
Location: Murcia/Spain
Device: Android 12
Quote:
Originally Posted by michaelbr View Post
Thanks all for your reply, I'll try out your suggestions during this weekend to see if it'll fix the problem.
Here's an update, I'm afraid I messed up pretty good the file I was working on, I think when I tried to change from UTF-8 to ISO-8859-1, I did not reverse back the changes I made, so the weird char got worse and it took me several hours trying to fix it, at the end I gave up. Got a back up file and now everything is fine. Thanks so much for your suggestions.
michaelbr is offline   Reply With Quote
Advert
Old 11-15-2020, 02:33 PM   #6
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by michaelbr View Post
... so the weird char got worse ...
Sorry, but that made me laugh. The demonic char from hell.
hobnail is offline   Reply With Quote
Old 11-15-2020, 05:17 PM   #7
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by michaelbr View Post
Got a back up file and now everything is fine. Thanks so much for your suggestions.
Great to hear.

But what was the weird character? Can you copy/paste it here?

Quote:
Originally Posted by michaelbr View Post
Here's an update, I'm afraid I messed up pretty good the file I was working on, I think when I tried to change from UTF-8 to ISO-8859-1, I did not reverse back the changes I made, so the weird char got worse and it took me several hours trying to fix it, at the end I gave up.
EPUB files only use UTF-8, so when you tried changing the encoding, that wasn't a good idea either.

You see this pretty often when characters like the:

— (EM DASH)

turn into:

–

Good tools like Calibre should be able to convert to UTF-8 properly.

But if you already mangled your original beyond repair... usually it's best to do what you did—start from your last good backup.
Tex2002ans is offline   Reply With Quote
Reply

Tags
charset, encodings, epub 2

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
regex newbie search end of string char problem michaelbr Sigil 6 10-15-2020 01:54 PM
Problem with char encoding sse450 Calibre 7 12-02-2019 12:57 AM
Display Char Value phossler Editor 2 05-05-2014 05:27 PM
Weird, temporary, display bug zartemis Amazon Kindle 1 11-26-2007 05:59 AM


All times are GMT -4. The time now is 02:11 PM.


MobileRead.com is a privately owned, operated and funded community.