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

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-18-2017, 07:01 AM   #1
cramoisi
Addict
cramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchfork
 
cramoisi's Avatar
 
Posts: 221
Karma: 48967
Join Date: Apr 2015
Location: Liège - Belgium
Device: Kobo Aura (wife) - kobo gloHD (Mine)
non-breaking space

Hello,

Is it normal that Koreader doesn't respect non breakable space before some signs ? (in french, we have NBSP before ? ! « and »). I love KR but really, i can't stand a ? or a ? alone at the beginning of the line.

I checked the epub, the nbsp sign was present in utf-8, I change it in html entities with no success (  and  ). Is it a known bug ? I didn't find anything about it...

Regards,
S
cramoisi is offline   Reply With Quote
Advert
Old 04-18-2017, 08:35 AM   #2
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,016
Karma: 5819480
Join Date: Dec 2009
Location: The Heart of Texas
Device: JetBook Lite (retired), AuraHD, PDA,
It's been discussed at the project on Github, I don't know if it was fixed or if anyone is working on the issue.

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Old 04-18-2017, 09:50 AM   #3
cramoisi
Addict
cramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchfork
 
cramoisi's Avatar
 
Posts: 221
Karma: 48967
Join Date: Apr 2015
Location: Liège - Belgium
Device: Kobo Aura (wife) - kobo gloHD (Mine)
One "temporary solution" could be to remove them and glue ? ! etc to the words like in english. But I'm so accustomed to the french typography when i read french... Anyway, thanks for your answer, i will wait and not try any further.
Regards,
s
cramoisi is offline   Reply With Quote
Old 04-20-2017, 07:11 AM   #4
Frenzie
Addict
Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.
 
Posts: 207
Karma: 105242
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
The only reference to non-breaking spaces I've been able to find is here: https://github.com/koreader/koreader...ment-273549019
Frenzie is offline   Reply With Quote
Old 04-21-2017, 02:19 AM   #5
cramoisi
Addict
cramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchfork
 
cramoisi's Avatar
 
Posts: 221
Karma: 48967
Join Date: Apr 2015
Location: Liège - Belgium
Device: Kobo Aura (wife) - kobo gloHD (Mine)
Dealing nbsp plagues my ereading since the first day haha
cramoisi is offline   Reply With Quote
Old 04-21-2017, 03:18 AM   #6
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,125
Karma: 2150557
Join Date: Jan 2009
Device: Kobo Glo - Kindle PW3 (wifi)
Hi

  (named entities) are considered to be a thing of the past. I have been using for some years without any problem their utf-8 equivalent, which is \u00a0 or (this is Sigil's choice) & # 1 6 0 ; without the spaces
I also use "fines insécables" (nnbsp) with their utf-8 value without problem, provided the embedded font recognizes this utf-8 character.

You can find one EPUB3 here which displays fine on Koreader and makes use of both.
https://www.mobileread.com/forums/sh...86&postcount=3

I can provide you regex to perform this change if need be.

Last edited by roger64; 04-21-2017 at 03:21 AM.
roger64 is offline   Reply With Quote
Old 04-21-2017, 04:31 AM   #7
cramoisi
Addict
cramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchfork
 
cramoisi's Avatar
 
Posts: 221
Karma: 48967
Join Date: Apr 2015
Location: Liège - Belgium
Device: Kobo Aura (wife) - kobo gloHD (Mine)
@roger64 : I said nbsp as a shortcut to non-breaking spaces (not for the html entity). I meant \u00a0 or & # 160 ; of course. All my tests with these and french ebooks show that koreader doesn't display them correctly.

I'll will try the epub you linked. I already check it with calibre and it says narrow-non-breaking space which is 8239 that could be the answer


Edit : i checked with different size and i've yet to see an error. Is koreader manage the narrow non-breaking space - 8239 - differently than the classic - 160 - one ? (all my previous tests were based on the classic one) which is the default one when ebooks are publish (it seems to me).


"I can provide you regex to perform this change if need be." => i would be sooo grateful !

Last edited by cramoisi; 04-21-2017 at 05:16 AM. Reason: tests
cramoisi is offline   Reply With Quote
Old 04-21-2017, 06:15 AM   #8
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,125
Karma: 2150557
Join Date: Jan 2009
Device: Kobo Glo - Kindle PW3 (wifi)
Usually, I use nnbsp (fines insécables) because I use embedded fonts and later convert to six-inch PDF. I find them smarter. So I tend to convert most of nbsp to fines.

Of course, some nbsp equivalents are left, namely after "tirets de dialogue".

You'll find lower down the group of regex in .json format that I use with the Calibre editor. You can import all of them and execute them as a group. If you have any question, let me know.

The construction of each regex is very basic.
Attached Files
File Type: zip insecables.json.zip (808 Bytes, 27 views)
roger64 is offline   Reply With Quote
Old 04-21-2017, 06:47 AM   #9
cramoisi
Addict
cramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchfork
 
cramoisi's Avatar
 
Posts: 221
Karma: 48967
Join Date: Apr 2015
Location: Liège - Belgium
Device: Kobo Aura (wife) - kobo gloHD (Mine)
Quote:
Originally Posted by roger64 View Post
If you have any question, let me know.
I got the dummi-est question of all : how do I import the json in the calibre editor ?
cramoisi is offline   Reply With Quote
Old 04-21-2017, 08:39 AM   #10
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,125
Karma: 2150557
Join Date: Jan 2009
Device: Kobo Glo - Kindle PW3 (wifi)
Quote:
Originally Posted by cramoisi View Post
I got the dummi-est question of all : how do I import the json in the calibre editor ?
Menu de l'éditeur de Calibre: Rechercher/Recherches sauvegardées

Sur la petite fenêtre qui apparait, cliquer sur "Importer" et désigner le fichier insécables.json (préalablement décompressé)
roger64 is offline   Reply With Quote
Old 04-21-2017, 09:23 AM   #11
Frenzie
Addict
Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.
 
Posts: 207
Karma: 105242
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by roger64 View Post
  (named entities) are considered to be a thing of the past.
By whom? There's a whole big list of named character references in the specification (which includes nbsp): https://www.w3.org/TR/html5/syntax.h...ter-references
Frenzie is offline   Reply With Quote
Old 04-21-2017, 09:41 AM   #12
cramoisi
Addict
cramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchforkcramoisi can load mercury with a pitchfork
 
cramoisi's Avatar
 
Posts: 221
Karma: 48967
Join Date: Apr 2015
Location: Liège - Belgium
Device: Kobo Aura (wife) - kobo gloHD (Mine)
Quote:
Originally Posted by Frenzie View Post
By whom? There's a whole big list of named character references in the specification (which includes nbsp): https://www.w3.org/TR/html5/syntax.h...ter-references
yes. like & nbsp; the & shy is present ! (I hated these two ) in any way a reader should deal with & nbsp ; \u 00a0 and & # 160 in the same way, nope ? I tested with the three with no success.

Also, the reason people use less & nbsp is because it doesn't validate xhtml or XML in html5 for the only html entities you can have in a xml are & amp lt gt, quot and apos (but it's like my opinion )

Last edited by cramoisi; 04-21-2017 at 10:08 AM.
cramoisi is offline   Reply With Quote
Old 04-21-2017, 12:28 PM   #13
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,125
Karma: 2150557
Join Date: Jan 2009
Device: Kobo Glo - Kindle PW3 (wifi)
Quote:
Originally Posted by Frenzie View Post
By whom? There's a whole big list of named character references in the specification (which includes nbsp): https://www.w3.org/TR/html5/syntax.h...ter-references
EPUB3 does not make any use of named entities. I can't provide you with the official reference but I trust somebody will.

EPUB3 is supposed to be the replacement of EPUB2... The technical rationale comes from cramoisi.
roger64 is offline   Reply With Quote
Old 04-21-2017, 02:40 PM   #14
Frenzie
Addict
Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.Frenzie shapes the world with his or her thoughts.
 
Posts: 207
Karma: 105242
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by cramoisi View Post
Also, the reason people use less & nbsp is because it doesn't validate xhtml or XML in html5 for the only html entities you can have in a xml are & amp lt gt, quot and apos (but it's like my opinion )
It most definitely validates as XHTML since it's part of the DTD (see here). In XHTML5 they would be undefined by default due to the lack of a DTD (see here), but as far as valid XML goes you could just copy the old definitions if you wanted to use them. Something along these lines should to the trick.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html [
<!ENTITY nbsp   "*"> <!-- no-break space = non-breaking space,
                                  U+00A0 ISOnum -->
]>
<html xmlns="http://www.w3.org/1999/xhtml">
NB I'm not saying a thing about EPUB.
Frenzie is offline   Reply With Quote
Old 04-21-2017, 03:24 PM   #15
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,125
Karma: 2150557
Join Date: Jan 2009
Device: Kobo Glo - Kindle PW3 (wifi)
My sentence was probably too short. I was referring about ebooks use (what else here?).

- Sigil gave up the use of nbsp as a named entity and replaces them systematically by & # 160 for EPUB3 books.
- The calibre editor disapproves the use of named entities and offers systematically to replace them by their utf-8 equivs for all EPUBs.
roger64 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Non breaking space (possible) bug rferran Sigil 3 12-02-2016 12:33 PM
Non-Breaking space drago87 Conversion 0 01-20-2016 05:52 AM
Why the non-breaking space? Notjohn Sigil 2 06-08-2015 05:24 AM
Non-breaking space (doubled) bug Camelot Sigil 49 02-13-2015 04:20 PM
Non-breaking space JSWolf ePub 31 07-29-2014 08:40 AM


All times are GMT -4. The time now is 01:15 AM.


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